Skip to content

Commit 8d24f7e

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7173,7 +7173,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
71737173
if (jsExpr is js_ast.LiteralString && jsExpr.valueWithoutQuotes.isEmpty) {
71747174
continue;
71757175
}
7176-
var type = e.getStaticType(_staticTypeContext);
7176+
var type = e.getStaticType(_staticTypeContext).extensionTypeErasure;
71777177
if (DartTypeEquivalence(_coreTypes, ignoreTopLevelNullability: true)
71787178
.areEqual(type, _coreTypes.stringNonNullableRawType) &&
71797179
!isNullable(e)) {

0 commit comments

Comments
 (0)