stack trace while renaming local field named "toString" #25933
Labels
analyzer-refactoring
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P1
A high priority bug; for example, a single project is unusable or has many test failures
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
I had accidentally named a field toString and was attempting to fix it. I tried renaming it back, but cancelled the refactoring. I'm not sure what I did next after that.
RequestError method: edit.getRefactoring, code: SERVER_ERROR, message: The null object does not have a method 'contains'.
NoSuchMethodError: method not found: 'contains'
Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2 _ConflictValidatorVisitor.visitSimpleIdentifier (package:analysis_server/src/services/refactoring/rename_local.dart:153)
#3 SimpleIdentifierImpl.accept (package:analyzer/src/dart/ast/ast.dart:8868)
#4 AstNodeImpl._safelyVisitChild (package:analyzer/src/dart/ast/ast.dart:950)
#5 VariableDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10628)
#6 RecursiveAstVisitor.visitVariableDeclaration (package:analyzer/dart/ast/visitor.dart:1954)
#7 VariableDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:10623)
#8 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7582)
#9 VariableDeclarationListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10724)
#10 RecursiveAstVisitor.visitVariableDeclarationList (package:analyzer/dart/ast/visitor.dart:1960)
#11 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:10718)
#12 AstNodeImpl._safelyVisitChild (package:analyzer/src/dart/ast/ast.dart:950)
#13 FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4208)
#14 RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:1569)
#15 FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4203)
#16 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7582)
#17 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1893)
#18 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:1425)
#19 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1833)
#20 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7582)
#21 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2421)
#22 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:1449)
#23 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2414)
#24 RenameLocalRefactoringImpl._analyzePossibleConflicts_inLibrary (package:analysis_server/src/services/refactoring/rename_local.dart:96)
#25 RenameLocalRefactoringImpl.checkFinalConditions.<checkFinalConditions_async_body> (package:analysis_server/src/services/refactoring/rename_local.dart:55)
#26 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:27)
#27 _rootRunUnary (dart:async/zone.dart:902)
#28 _CustomZone.runUnary (dart:async/zone.dart:798)
#29 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:551)
#30 _Future._propagateToListeners (dart:async/future_impl.dart:637)
#31 _Future._complete (dart:async/future_impl.dart:414)
#32 _SyncCompleter.complete (dart:async/future_impl.dart:52)
#33 RenameLocalRefactoringImpl._prepareElements.<_prepareElements_async_body> (package:analysis_server/src/services/refactoring/rename_local.dart:124)
#34 Future.Future.microtask. (dart:async/future.dart:144)
#35 _rootRun (dart:async/zone.dart:891)
#36 _CustomZone.run (dart:async/zone.dart:790)
#37 _CustomZone.runGuarded (dart:async/zone.dart:696)
#38 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#39 _rootRun (dart:async/zone.dart:895)
#40 _CustomZone.run (dart:async/zone.dart:790)
#41 _CustomZone.runGuarded (dart:async/zone.dart:696)
#42 _CustomZone.bindCallback. (dart:async/zone.dart:721)
#43 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#44 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#45 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#46 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)
The text was updated successfully, but these errors were encountered: