Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: pkg/compiler/lib/src/resolution/type_resolver.dart

Issue 2559523006: Implement `FutureOr<T>` for dart2js. (Closed)
Patch Set: Update status file. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698