Skip to content

Commit 4387b5d

Browse files
fishythefishCommit Queue
authored and
Commit Queue
committed
[dart2js] Use futureValueType in impact computation.
Change-Id: Ic6f54cf14098c9cc1cfe01ee01a09e7be5ce419a Bug: #54317 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341600 Reviewed-by: Nate Biggs <[email protected]> Commit-Queue: Mayank Patke <[email protected]>
1 parent 6c09ade commit 4387b5d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pkg/compiler/lib/src/ir/impact_data.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,7 @@ class ImpactBuilder extends StaticTypeVisitor implements ImpactRegistry {
185185
break;
186186

187187
case ir.AsyncMarker.Async:
188-
ir.DartType elementType = const ir.DynamicType();
189-
if (returnType is ir.InterfaceType &&
190-
returnType.classNode == typeEnvironment.coreTypes.futureClass) {
191-
elementType = returnType.typeArguments.first;
192-
} else if (returnType is ir.FutureOrType) {
193-
elementType = returnType.typeArgument;
194-
}
195-
registerAsync(elementType);
188+
registerAsync(function.futureValueType!);
196189
break;
197190

198191
case ir.AsyncMarker.AsyncStar:

0 commit comments

Comments
 (0)