Skip to content

Commit 38e2d34

Browse files
nshahanCommit Queue
authored and
Commit Queue
committed
[ddc] Erase extension types in as expressions
Ensures the same optimizations to expressions statically typed as extension types. Issue: #49735 Change-Id: If85f17203cb4c07c06da0e2e1712fea15c39c444 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342106 Reviewed-by: Mark Zhou <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent 8d24f7e commit 38e2d34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/dev_compiler/lib/src/kernel/compiler.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7276,7 +7276,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
72767276
var jsFrom = _visitExpression(fromExpr);
72777277
if (node.isUnchecked) return jsFrom;
72787278
var to = node.type.extensionTypeErasure;
7279-
var from = fromExpr.getStaticType(_staticTypeContext);
7279+
var from = fromExpr.getStaticType(_staticTypeContext).extensionTypeErasure;
72807280

72817281
// If the check was put here by static analysis to ensure soundness, we
72827282
// can't skip it. For example, one could implement covariant generic caller

0 commit comments

Comments
 (0)