mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed local method 'this' inside mixins
This commit is contained in:
parent
ea0ccae3d5
commit
7de7245b33
2 changed files with 12 additions and 3 deletions
|
@ -17844,6 +17844,11 @@ BfModuleMethodInstance BfModule::GetLocalMethodInstance(BfLocalMethod* localMeth
|
|||
auto callerMethodState = mCurMethodState;
|
||||
|
||||
auto typeInst = mCurTypeInstance;
|
||||
|
||||
if (mCurMethodState->mMixinState != NULL)
|
||||
{
|
||||
typeInst = mCurMethodState->mMixinState->mMixinMethodInstance->GetOwner();
|
||||
}
|
||||
|
||||
auto methodDef = GetLocalMethodDef(localMethod);
|
||||
|
||||
|
@ -18238,7 +18243,7 @@ BfModuleMethodInstance BfModule::GetLocalMethodInstance(BfLocalMethod* localMeth
|
|||
// We can only set mutating if our owning type is mutating
|
||||
if (localVar->mWrittenToId >= closureState.mCaptureStartAccessId)
|
||||
{
|
||||
if (mCurTypeInstance->IsValueType())
|
||||
if (typeInst->IsValueType())
|
||||
{
|
||||
if (rootMethodState->mMethodInstance->mMethodDef->mIsMutating)
|
||||
methodDef->mIsMutating = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue