File tree 2 files changed +2
-11
lines changed
pkg/dev_compiler/lib/src/kernel
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -7233,8 +7233,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
7233
7233
7234
7234
@override
7235
7235
js_ast.Expression visitIsExpression (IsExpression node) {
7236
- return _emitIsExpression (
7237
- node.operand, shallowExtensionTypeErasure (node.type));
7236
+ return _emitIsExpression (node.operand, node.type.extensionTypeErasure);
7238
7237
}
7239
7238
7240
7239
js_ast.Expression _emitIsExpression (Expression operand, DartType type) {
@@ -7271,7 +7270,7 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
7271
7270
var fromExpr = node.operand;
7272
7271
var jsFrom = _visitExpression (fromExpr);
7273
7272
if (node.isUnchecked) return jsFrom;
7274
- var to = shallowExtensionTypeErasure ( node.type) ;
7273
+ var to = node.type.extensionTypeErasure ;
7275
7274
var from = fromExpr.getStaticType (_staticTypeContext);
7276
7275
7277
7276
// If the check was put here by static analysis to ensure soundness, we
Original file line number Diff line number Diff line change @@ -17,14 +17,6 @@ Never throwUnsupportedAuxiliaryType(AuxiliaryType type) =>
17
17
throw UnsupportedError (
18
18
'Unsupported auxiliary type $type (${type .runtimeType }).' );
19
19
20
- /// Returns [type] with the immediate type erasure applied.
21
- ///
22
- /// When [type] is an [ExtensionType] this is equivalent to `type.typeErasure` .
23
- /// The immediately returned value will not be an [ExtensionType] but it could
24
- /// still contain other [ExtensionType] s embedded within.
25
- DartType shallowExtensionTypeErasure (DartType type) =>
26
- type is ExtensionType ? type.extensionTypeErasure : type;
27
-
28
20
Constructor ? unnamedConstructor (Class c) =>
29
21
c.constructors.firstWhereOrNull ((c) => c.name.text == '' );
30
22
You can’t perform that action at this time.
0 commit comments