Index: pkg/compiler/lib/src/resolution/type_resolver.dart |
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart |
index bc9f2e5a0a3e9c247b161766d2e47dc188b21450..3acc024e5fe5b0445a112cae6d98c6e5d5bb4c13 100644 |
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart |
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart |
@@ -154,6 +154,11 @@ class TypeResolver { |
} else if (!element.impliesType) { |
type = reportFailureAndCreateType( |
MessageKind.NOT_A_TYPE, {'node': node.typeName}); |
+ } else if (element.library.isPlatformLibrary && |
+ element.name == 'FutureOr') { |
+ type = const DynamicType(); |
+ registry.useType(node, type); |
+ return type; |
} else { |
bool addTypeVariableBoundsCheck = false; |
if (element.isClass) { |