1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed ref autoprop

This commit is contained in:
Brian Fiete 2021-01-20 07:43:17 -08:00
parent 7e307b2f0d
commit 18208cb958

View file

@ -19491,7 +19491,8 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup)
lookupValue = BfTypedValue(mBfIRBuilder->CreateInBoundsGEP(GetThis().mValue, 0, fieldInstance->mDataIdx), fieldInstance->mResolvedType, true);
else
lookupValue = ExtractValue(GetThis(), fieldInstance, fieldInstance->mDataIdx);
lookupValue = LoadOrAggregateValue(lookupValue);
if (!methodInstance->mReturnType->IsRef())
lookupValue = LoadOrAggregateValue(lookupValue);
CreateReturn(lookupValue.mValue);
EmitLifetimeEnds(&mCurMethodState->mHeadScope);
}