From bd6e21073e11fa53da3941d99f2df972de1b53c8 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 6 Nov 2020 12:25:02 -0800 Subject: [PATCH] Mixin 'this' fix --- IDEHelper/Compiler/BfModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 4f4b2270..805342f3 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -13032,8 +13032,7 @@ BfTypedValue BfModule::ReferenceStaticField(BfFieldInstance* fieldInstance) BfTypedValue BfModule::GetThis() { auto useMethodState = mCurMethodState; - while ((useMethodState != NULL) && (useMethodState->mClosureState != NULL) && (useMethodState->mClosureState->mCapturing) && - (useMethodState->mMixinState == NULL)) + while ((useMethodState != NULL) && (useMethodState->mClosureState != NULL) && (useMethodState->mClosureState->mCapturing)) { useMethodState = useMethodState->mPrevMethodState; } @@ -13089,7 +13088,7 @@ BfTypedValue BfModule::GetThis() // Check mixin state for 'this' { - auto checkMethodState = useMethodState; + auto checkMethodState = mCurMethodState; while (checkMethodState != NULL) { if (checkMethodState->mMixinState != NULL)