File tree 1 file changed +2
-2
lines changed
pkg/dev_compiler/lib/src/kernel
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -5434,7 +5434,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
5434
5434
/// members at runtime.
5435
5435
bool _shouldCallObjectMemberHelper (Expression e) {
5436
5436
if (isNullable (e)) return true ;
5437
- var type = e.getStaticType (_staticTypeContext);
5437
+ var type = e.getStaticType (_staticTypeContext).extensionTypeErasure ;
5438
5438
if (type is RecordType || type is FunctionType ) return false ;
5439
5439
if (type is InterfaceType ) {
5440
5440
// TODO(nshahan): This could be expanded to any classes where we know all
@@ -5460,7 +5460,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
5460
5460
/// This is a simple approach and not an exhaustive search.
5461
5461
bool _triviallyConstNoInterop (Expression ? e) {
5462
5462
if (e is ConstantExpression ) {
5463
- var type = e.constant.getType (_staticTypeContext);
5463
+ var type = e.constant.getType (_staticTypeContext).extensionTypeErasure ;
5464
5464
if (type is InterfaceType ) return ! usesJSInterop (type.classNode);
5465
5465
} else if (e is StaticGet && e.target.isConst) {
5466
5466
var target = e.target;
You can’t perform that action at this time.
0 commit comments