Index: pkg/compiler/lib/src/typechecker.dart |
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart |
index aeedfa6c53fc6da0e97a3e78eb324618913820b7..be25edf0f08303263380249cc08cf712f9082e50 100644 |
--- a/pkg/compiler/lib/src/typechecker.dart |
+++ b/pkg/compiler/lib/src/typechecker.dart |
@@ -1742,7 +1742,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
DartType visitAwait(Await node) { |
DartType expressionType = analyze(node.expression); |
- if (compiler.backend.supportsAsyncAwait) { |
+ if (resolution.target.supportsAsyncAwait) { |
return types.flatten(expressionType); |
} else { |
return const DynamicType(); |
@@ -1869,7 +1869,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
visitAsyncForIn(AsyncForIn node) { |
DartType elementType = computeForInElementType(node); |
DartType expressionType = analyze(node.expression); |
- if (compiler.backend.supportsAsyncAwait) { |
+ if (resolution.target.supportsAsyncAwait) { |
DartType streamOfDynamic = coreTypes.streamType(); |
if (!types.isAssignable(expressionType, streamOfDynamic)) { |
reportMessage(node.expression, MessageKind.NOT_ASSIGNABLE, |