Index: pkg/compiler/lib/src/elements/modelx.dart |
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart |
index 248a9ef96606a9833d5128969d8c265cd8d6ab90..e2588fc24fb1a419e139ce03e57f2399ec836445 100644 |
--- a/pkg/compiler/lib/src/elements/modelx.dart |
+++ b/pkg/compiler/lib/src/elements/modelx.dart |
@@ -5,6 +5,7 @@ |
library elements.modelx; |
import '../common.dart'; |
+import '../common/names.dart' show Identifiers; |
import '../common/resolution.dart' show Resolution, ParsingContext; |
import '../compiler.dart' show Compiler; |
import '../constants/constant_constructors.dart'; |
@@ -1259,6 +1260,11 @@ class PrefixElementX extends ElementX implements PrefixElement { |
return visitor.visitPrefixElement(this, arg); |
} |
+ @override |
+ GetterElement get loadLibrary { |
+ return isDeferred ? lookupLocalMember(Identifiers.loadLibrary) : null; |
+ } |
+ |
String toString() => '$kind($name)'; |
} |
@@ -2254,7 +2260,7 @@ class DeferredLoaderGetterElementX extends GetterElementX |
DeferredLoaderGetterElementX(PrefixElement prefix) |
: this.prefix = prefix, |
- super("loadLibrary", Modifiers.EMPTY, prefix, false) { |
+ super(Identifiers.loadLibrary, Modifiers.EMPTY, prefix, false) { |
functionSignature = new FunctionSignatureX(type: new FunctionType(this)); |
} |
@@ -2265,6 +2271,7 @@ class DeferredLoaderGetterElementX extends GetterElementX |
bool get isDeferredLoaderGetter => true; |
bool get isTopLevel => true; |
+ |
// By having position null, the enclosing elements location is printed in |
// error messages. |
Token get position => null; |
@@ -2275,6 +2282,13 @@ class DeferredLoaderGetterElementX extends GetterElementX |
FunctionExpression get node => null; |
+ bool get hasResolvedAst => true; |
+ |
+ ResolvedAst get resolvedAst { |
+ return new SynthesizedResolvedAst( |
+ this, ResolvedAstKind.DEFERRED_LOAD_LIBRARY); |
+ } |
+ |
@override |
SetterElement get setter => null; |
} |