Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for crash when annotation references synthtic constructor of a ge…
…neric class alias. FAILURE: mixi@:class<s=a(=m [NoSuchMethodError: The getter 'enclosingElement' was called on null. Receiver: null Tried calling: enclosingElement, #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5) flutter#1 LinkedResolutionReader.nextElement (package:analyzer/src/summary2/bundle_reader.dart:602:22) flutter#2 ApplyResolutionVisitor._nextElement (package:analyzer/src/summary2/apply_resolution.dart:1106:24) flutter#3 ApplyResolutionVisitor.visitAnnotation (package:analyzer/src/summary2/apply_resolution.dart:83:20) flutter#4 AnnotationImpl.accept (package:analyzer/src/dart/ast/ast.dart:280:49) #5 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20) flutter#6 ApplyResolutionVisitor.visitClassTypeAlias (package:analyzer/src/summary2/apply_resolution.dart:167:20) flutter#7 ClassTypeAliasImpl.accept (package:analyzer/src/dart/ast/ast.dart:1794:49) flutter#8 LinkedContext.applyResolution (package:analyzer/src/summary2/bundle_reader.dart:512:11) flutter#9 LinkedUnitContext.applyResolution (package:analyzer/src/summary2/linked_unit_context.dart:93:25) flutter#10 ElementImpl.metadata (package:analyzer/src/dart/element/element.dart:2893:21) flutter#11 ResolutionVisitor.visitClassTypeAlias (package:analyzer/src/dart/resolver/resolution_visitor.dart:256:51) flutter#12 ClassTypeAliasImpl.accept (package:analyzer/src/dart/ast/ast.dart:1794:49) flutter#13 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20) flutter#14 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2141:21) flutter#15 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:731:10) flutter#16 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2134:49) flutter#17 LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:680:10) flutter#18 LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:139:7) flutter#19 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:387:8) flutter#20 LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:138:11) #21 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:107:12) #22 AnalysisDriver._computeResolvedLibrary2.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1414:65) #23 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15) #24 AnalysisDriver._computeResolvedLibrary2 (package:analyzer/src/dart/analysis/driver.dart:1400:20) #25 AnalysisDriver._computeResolvedLibrary.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1393:15) Change-Id: I6f04a325b30d9dc61e7eb1a4bba91ed8b9bcd1d3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176060 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
- Loading branch information