From 9744c319c769206f426275bf73f57c00271f4e39 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Sat, 1 Dec 2018 00:07:44 +0100 Subject: [PATCH] Fix an issue with 'super' not being present when inlining --- src/compiler.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/compiler.ts b/src/compiler.ts index 1ad3cfef..94110669 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -5410,11 +5410,27 @@ export class Compiler extends DiagnosticEmitter { (parent).type, "this" ); + let parentBase = (parent).base; + if (parentBase) { + flow.addScopedLocalAlias( + getGetLocalIndex(thisArg), + parentBase.type, + "super" + ); + } } else { let thisLocal = flow.addScopedLocal((parent).type, "this", false); body.push( module.createSetLocal(thisLocal.index, thisArg) ); + let parentBase = (parent).base; + if (parentBase) { + flow.addScopedLocalAlias( + thisLocal.index, + parentBase.type, + "super" + ); + } } } var parameterTypes = signature.parameterTypes;