Skip to content

Commit 9744c31

Browse files
committed
Fix an issue with 'super' not being present when inlining
1 parent 5c39043 commit 9744c31

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/compiler.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5410,11 +5410,27 @@ export class Compiler extends DiagnosticEmitter {
54105410
(<Class>parent).type,
54115411
"this"
54125412
);
5413+
let parentBase = (<Class>parent).base;
5414+
if (parentBase) {
5415+
flow.addScopedLocalAlias(
5416+
getGetLocalIndex(thisArg),
5417+
parentBase.type,
5418+
"super"
5419+
);
5420+
}
54135421
} else {
54145422
let thisLocal = flow.addScopedLocal((<Class>parent).type, "this", false);
54155423
body.push(
54165424
module.createSetLocal(thisLocal.index, thisArg)
54175425
);
5426+
let parentBase = (<Class>parent).base;
5427+
if (parentBase) {
5428+
flow.addScopedLocalAlias(
5429+
thisLocal.index,
5430+
parentBase.type,
5431+
"super"
5432+
);
5433+
}
54185434
}
54195435
}
54205436
var parameterTypes = signature.parameterTypes;

0 commit comments

Comments
 (0)