Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2824873002: Fix cast exception when a Handle gets a wrong element because of name conflict. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/analysis_server.iml ('k') | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 7a348354efa021830680e19a9b621fbdec2b476a..8640a71aba0e1aaeb12371a1379370c317314b1f 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1056,7 +1056,9 @@ abstract class CompilationUnitElementForLink
resolveRef(containingReference).getContainedName(name);
}
} else if (linkedReference.dependency == 0) {
- if (name == 'void') {
+ if (linkedReference.kind == ReferenceKind.unresolved) {
+ _references[index] = UndefinedElementForLink.instance;
+ } else if (name == 'void') {
_references[index] = enclosingElement._linker.voidElement;
} else if (name == '*bottom*') {
_references[index] = enclosingElement._linker.bottomElement;
« no previous file with comments | « pkg/analysis_server/analysis_server.iml ('k') | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698