Index: pkg/analyzer/lib/src/generated/element_resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart |
index b1c5283b5a4c3080907601f9387279002941f8a0..4dd9726bc298f6b63391f79bb44ea0682167d843 100644 |
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart |
@@ -626,7 +626,8 @@ class ElementResolver extends SimpleAstVisitor<Object> { |
[(target as SimpleIdentifier).name]); |
} |
LibraryElement importedLibrary = _getImportedLibrary(target); |
- FunctionElement loadLibraryFunction = importedLibrary.loadLibraryFunction; |
+ FunctionElement loadLibraryFunction = |
+ importedLibrary?.loadLibraryFunction; |
methodName.staticElement = loadLibraryFunction; |
node.staticInvokeType = loadLibraryFunction.type; |
return null; |
@@ -894,7 +895,7 @@ class ElementResolver extends SimpleAstVisitor<Object> { |
if (identifier.name == FunctionElement.LOAD_LIBRARY_NAME && |
_isDeferredPrefix(prefix)) { |
LibraryElement importedLibrary = _getImportedLibrary(prefix); |
- identifier.staticElement = importedLibrary.loadLibraryFunction; |
+ identifier.staticElement = importedLibrary?.loadLibraryFunction; |
return null; |
} |
// |