New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'ClassElementForLink_Enum' has no instance method 'getSetter' with matching arguments during Map editing #35891

Open
timsneath opened this Issue Feb 9, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@timsneath
Copy link

timsneath commented Feb 9, 2019

Please review the below report for any information you do not wish to share and report to
https://github.com/dart-lang/sdk/issues/new

Exception from analysis server (running from VSCode / Dart Code)

What I was doing

(please describe what you were doing when this exception occurred)

Versions

  • Flutter SDK 1.2.1-pre.125
  • Visual Studio Code 1.31.0
  • Dart Code 2.22.3

Analyzer Info

The analyzer was launched using the arguments:

/Users/timsneath/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=2.22.3

Exception

Analysis failed: /Users/timsneath/git/me/console/console2/test/console2_test.dart context: exception_20190208_190924_190

NoSuchMethodError: Class 'ClassElementForLink_Enum' has no instance method 'getSetter' with matching arguments.
Receiver: Instance of 'ClassElementForLink_Enum'
Tried calling: getSetter("green")
Found: getSetter(String) => PropertyAccessorElement
#0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1      ClassElementForLink.noSuchMethod (package:analyzer/src/summary/link.dart:566:48)
#2      ClassElementForLink_Enum.getSetter (package:analyzer/src/dart/element/element.dart:179:27)
#3      ElementResolver._resolveElement (package:analyzer/src/generated/element_resolver.dart:1532:30)
#4      ElementResolver._resolvePropertyAccess (package:analyzer/src/generated/element_resolver.dart:1589:23)
#5      ElementResolver.visitPrefixedIdentifier (package:analyzer/src/generated/element_resolver.dart:649:5)
#6      PrefixedIdentifierImpl.accept (package:analyzer/src/dart/ast/ast.dart:9875:49)
#7      ResolverVisitor.visitPrefixedIdentifier (package:analyzer/src/generated/resolver.dart:4927:10)
#8      PrefixedIdentifierImpl.accept (package:analyzer/src/dart/ast/ast.dart:9875:49)
#9      ResolverVisitor.visitAssignmentExpression (package:analyzer/src/generated/resolver.dart:3920:24)
#10     AssignmentExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:834:49)
#11     MapLiteralEntryImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:8241:11)
#12     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4909:10)
#13     UnifyingAstVisitor.visitMapLiteralEntry (package:analyzer/dart/ast/visitor.dart:3523:51)
#14     MapLiteralEntryImpl.accept (package:analyzer/src/dart/ast/ast.dart:8237:49)
#15     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:9166:20)
#16     MapLiteralImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:8313:14)
#17     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4909:10)
#18     UnifyingAstVisitor.visitMapLiteral (package:analyzer/dart/ast/visitor.dart:3517:41)
#19     ResolverVisitor.visitMapLiteral (package:analyzer/src/generated/resolver.dart:4789:11)
#20     MapLiteralImpl.accept (package:analyzer/src/dart/ast/ast.dart:8308:49)
#21     ExprTypeComputer.compute (package:analyzer/src/summary/link.dart:2542:16)
#22     TypeInferenceNode.evaluate (package:analyzer/src/summary/link.dart:5286:36)
#23     TypeInferenceDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:5136:7)
#24     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2217:13)
#25     DependencyWalker.walk (package:analyzer/src/summary/link.dart:2236:18)
#26     VariableElementForLink.inferredType (package:analyzer/src/summary/link.dart:5562:47)
#27     TopLevelVariableElementForLink.link (package:analyzer/src/summary/link.dart:5121:48)
#28     CompilationUnitElementInBuildUnit.link (package:analyzer/src/summary/link.dart:1640:16)
#29     LibraryElementInBuildUnit.link (package:analyzer/src/summary/link.dart:3810:12)
#30     LibraryCycleNode.link (package:analyzer/src/summary/link.dart:3516:15)
#31     LibraryCycleDependencyWalker.evaluate (package:analyzer/src/summary/link.dart:3456:7)
#32     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2217:13)
#33     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#34     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#35     DependencyWalker.walk.strongConnect (package:analyzer/src/summary/link.dart:2183:24)
#36     DependencyWalker.walk (package:analyzer/src/summary/link.dart:2236:18)
#37     LibraryCycleForLink.ensureLinked (package:analyzer/src/summary/link.dart:3489:42)
#38     Linker.link (package:analyzer/src/summary/link.dart:4012:35)
#39     _relink (package:analyzer/src/summary/link.dart:305:57)
#40     link (package:analyzer/src/summary/link.dart:123:3)
#41     LibraryContext.load.<anonymous closure> (package:analyzer/src/dart/analysis/library_context.dart:170:25)
#42     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#43     LibraryContext.load (package:analyzer/src/dart/analysis/library_context.dart:169:12)
#44     new LibraryContext (package:analyzer/src/dart/analysis/library_context.dart:67:5)
#45     AnalysisDriver._createLibraryContext (package:analyzer/src/dart/analysis/driver.dart:1610:29)
#46     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1424:30)
#47     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#48     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1414:20)
#49     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1234:33)
<asynchronous suspension>
#50     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2143:24)
<asynchronous suspension>
#51     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2073:5)
#52     new AnalysisServer (package:analysis_server/src/analysis_server.dart:213:29)
#53     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:86:26)
#54     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#55     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:526:21)
#56     _rootRun (dart:async/zone.dart:1124:13)
#57     _CustomZone.run (dart:async/zone.dart:1021:19)
#58     _runZoned (dart:async/zone.dart:1516:10)
#59     runZoned (dart:async/zone.dart:1463:12)
#60     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:605:12)
#61     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:524:7)
#62     Driver.start (package:analysis_server/src/server/driver.dart:427:7)
#63     main (file:///b/rr/tmp4zHFAb/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#64     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#65     main (file:///b/rr/tmp4zHFAb/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#66     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:298:32)
#67     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Diagnostics requested after the error occurred are:

[
    {
        "name": "/Users/timsneath/git/me/console/console2",
        "explicitFileCount": 5,
        "implicitFileCount": 310,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    }
]
@stereotype441

This comment has been minimized.

Copy link
Member

stereotype441 commented Feb 12, 2019

@timsneath can you tell us the output of dart --version on your machine?

@stereotype441 stereotype441 changed the title Analysis failed during Map editing 'ClassElementForLink_Enum' has no instance method 'getSetter' with matching arguments during Map editing Feb 12, 2019

@timsneath

This comment has been minimized.

Copy link
Author

timsneath commented Feb 12, 2019

Unfortunately it's at home, and I'm traveling. But it's whatever was embedded in Flutter SDK 1.2.1-pre.125.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment