diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-07-01 21:42:26 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-07-03 08:09:21 +0000 |
commit | 24938ed2b9dccacdc2390b40dc10f71b8f734ad2 (patch) | |
tree | 4f92eec5bfc64881e36e2a723a27dec0f645d495 /src | |
parent | d31541fd9d7d52ef3eae29e7e5d36733d7f55375 (diff) |
Correctly setup the this object after a super call
Change-Id: I7c2d9c09b3059dcd6ce2eb356a74980a3410a245
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 2f28320697..4b766accbd 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2264,6 +2264,10 @@ void Codegen::handleConstruct(const Reference &base, ArgumentList *arguments) create.argv = calldata.argv; bytecodeGenerator->addInstruction(create); } + if (base.isSuper()) + // set the result up as the thisObject + Reference::fromAccumulator(this).storeOnStack(CallData::This); + _expr.setResult(Reference::fromAccumulator(this)); } |