mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
Fix an issue with 'super' not being present when inlining
This commit is contained in:
parent
5c39043f9e
commit
9744c319c7
@ -5410,11 +5410,27 @@ export class Compiler extends DiagnosticEmitter {
|
|||||||
(<Class>parent).type,
|
(<Class>parent).type,
|
||||||
"this"
|
"this"
|
||||||
);
|
);
|
||||||
|
let parentBase = (<Class>parent).base;
|
||||||
|
if (parentBase) {
|
||||||
|
flow.addScopedLocalAlias(
|
||||||
|
getGetLocalIndex(thisArg),
|
||||||
|
parentBase.type,
|
||||||
|
"super"
|
||||||
|
);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let thisLocal = flow.addScopedLocal((<Class>parent).type, "this", false);
|
let thisLocal = flow.addScopedLocal((<Class>parent).type, "this", false);
|
||||||
body.push(
|
body.push(
|
||||||
module.createSetLocal(thisLocal.index, thisArg)
|
module.createSetLocal(thisLocal.index, thisArg)
|
||||||
);
|
);
|
||||||
|
let parentBase = (<Class>parent).base;
|
||||||
|
if (parentBase) {
|
||||||
|
flow.addScopedLocalAlias(
|
||||||
|
thisLocal.index,
|
||||||
|
parentBase.type,
|
||||||
|
"super"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var parameterTypes = signature.parameterTypes;
|
var parameterTypes = signature.parameterTypes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user