Commit d2e5d47
Fix for crash when annotation references synthtic constructor of a generic 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]>1 parent 9dad187 commit d2e5d47
File tree
2 files changed
+106
-2
lines changed- pkg/analyzer
- lib/src/dart/element
- test/src/summary
2 files changed
+106
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
960 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
961 | 963 | | |
| 964 | + | |
| 965 | + | |
962 | 966 | | |
963 | 967 | | |
964 | 968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9547 | 9547 | | |
9548 | 9548 | | |
9549 | 9549 | | |
| 9550 | + | |
| 9551 | + | |
| 9552 | + | |
| 9553 | + | |
| 9554 | + | |
| 9555 | + | |
| 9556 | + | |
| 9557 | + | |
| 9558 | + | |
| 9559 | + | |
| 9560 | + | |
| 9561 | + | |
| 9562 | + | |
| 9563 | + | |
| 9564 | + | |
| 9565 | + | |
| 9566 | + | |
| 9567 | + | |
| 9568 | + | |
| 9569 | + | |
| 9570 | + | |
| 9571 | + | |
| 9572 | + | |
| 9573 | + | |
| 9574 | + | |
| 9575 | + | |
| 9576 | + | |
| 9577 | + | |
| 9578 | + | |
| 9579 | + | |
| 9580 | + | |
| 9581 | + | |
| 9582 | + | |
| 9583 | + | |
| 9584 | + | |
| 9585 | + | |
| 9586 | + | |
| 9587 | + | |
| 9588 | + | |
| 9589 | + | |
| 9590 | + | |
| 9591 | + | |
| 9592 | + | |
| 9593 | + | |
| 9594 | + | |
| 9595 | + | |
| 9596 | + | |
| 9597 | + | |
| 9598 | + | |
| 9599 | + | |
| 9600 | + | |
| 9601 | + | |
| 9602 | + | |
| 9603 | + | |
| 9604 | + | |
| 9605 | + | |
9550 | 9606 | | |
9551 | 9607 | | |
9552 | 9608 | | |
| |||
9574 | 9630 | | |
9575 | 9631 | | |
9576 | 9632 | | |
| 9633 | + | |
| 9634 | + | |
| 9635 | + | |
| 9636 | + | |
| 9637 | + | |
| 9638 | + | |
| 9639 | + | |
| 9640 | + | |
| 9641 | + | |
| 9642 | + | |
| 9643 | + | |
| 9644 | + | |
| 9645 | + | |
| 9646 | + | |
| 9647 | + | |
| 9648 | + | |
| 9649 | + | |
| 9650 | + | |
| 9651 | + | |
| 9652 | + | |
| 9653 | + | |
| 9654 | + | |
| 9655 | + | |
| 9656 | + | |
| 9657 | + | |
| 9658 | + | |
| 9659 | + | |
| 9660 | + | |
| 9661 | + | |
| 9662 | + | |
| 9663 | + | |
| 9664 | + | |
| 9665 | + | |
| 9666 | + | |
| 9667 | + | |
| 9668 | + | |
| 9669 | + | |
| 9670 | + | |
| 9671 | + | |
| 9672 | + | |
| 9673 | + | |
| 9674 | + | |
| 9675 | + | |
| 9676 | + | |
9577 | 9677 | | |
9578 | 9678 | | |
9579 | 9679 | | |
| |||
0 commit comments