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 dcf6c51194f0f90b320188de3c9f826b0caa2826..98635d306cb1ba19fcdf896d3b39215e62e79312 100644 |
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart |
@@ -591,6 +591,11 @@ class ElementResolver extends SimpleAstVisitor<Object> { |
propagatedElement = null; |
} else if (methodName.name == FunctionElement.LOAD_LIBRARY_NAME && |
_isDeferredPrefix(target)) { |
+ if (node.operator.type == sc.TokenType.QUESTION_PERIOD) { |
+ _resolver.reportErrorForNode( |
+ CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT, target, |
+ [(target as SimpleIdentifier).name]); |
+ } |
LibraryElement importedLibrary = _getImportedLibrary(target); |
methodName.staticElement = importedLibrary.loadLibraryFunction; |
return null; |