Index: pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
index 2427f3de0797a5b404fce5efa3eba1d1930173f7..d3c0b5bddde81eda78566a84fa8b340c1ca80cc7 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart |
@@ -169,6 +169,13 @@ class BodyBuilder extends ScopeListener<JumpTarget> implements BuilderHelper { |
@override |
Expression toValue(Object node) { |
if (node is UnresolvedIdentifier) { |
+ if (isDartLibrary && |
+ node.name.name == "main" && |
+ library.uri.path == "_builtin" && |
+ member?.name == "_getMainClosure") { |
+ // TODO(ahe): https://github.com/dart-lang/sdk/issues/28989 |
+ return new NullLiteral()..fileOffset = node.fileOffset; |
+ } |
return throwNoSuchMethodError( |
node.name.name, new Arguments.empty(), node.fileOffset, |
isGetter: true); |