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; |