Skip to content

Commit 4215dca

Browse files
committed
Version 2.10.0-110.5.beta
* Cherry-pick 53895b2 to beta * Cherry-pick 433fcd0 to beta
2 parents 52130c1 + 4c080bd commit 4215dca

File tree

8 files changed

+167
-231
lines changed

8 files changed

+167
-231
lines changed

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -867,16 +867,21 @@ class ProgramCompiler extends ComputeOnceConstantVisitor<js_ast.Expression>
867867
var savedTopLevelClass = _classEmittingExtends;
868868
_classEmittingExtends = c;
869869

870-
// Unroll mixins.
870+
// Refers to 'S' in `class C extends S`. Set this to null to avoid
871+
// referencing deferred supertypes in _emitClassConstructor's JS output.
872+
js_ast.Expression baseClass;
873+
871874
if (shouldDefer(supertype)) {
872875
deferredSupertypes.add(runtimeStatement('setBaseClass(#, #)', [
873876
getBaseClass(isMixinAliasClass(c) ? 0 : mixins.length),
874877
emitDeferredType(supertype),
875878
]));
879+
// Refers to 'supertype' without any type arguments.
876880
supertype =
877881
_coreTypes.rawType(supertype.classNode, _currentLibrary.nonNullable);
882+
} else {
883+
baseClass = emitClassRef(supertype);
878884
}
879-
var baseClass = emitClassRef(supertype);
880885

881886
if (isMixinAliasClass(c)) {
882887
// Given `class C = Object with M [implements I1, I2 ...];`

0 commit comments

Comments
 (0)