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

Fixed DoImplicitArgCapture with value composite member

This commit is contained in:
Brian Fiete 2021-12-27 13:34:36 -05:00
parent 977772de08
commit 268d7f7dba

View file

@ -11492,7 +11492,7 @@ BfTypedValue BfExprEvaluator::DoImplicitArgCapture(BfAstNode* refNode, BfMethodI
return lookupVal; return lookupVal;
} }
} }
if (paramType->IsComposite()) if ((paramType->IsComposite()) && (methodRefTarget.IsAddr()))
return BfTypedValue(mModule->mBfIRBuilder->CreateInBoundsGEP(methodRefTarget.mValue, 0, dataIdx), paramType, true); return BfTypedValue(mModule->mBfIRBuilder->CreateInBoundsGEP(methodRefTarget.mValue, 0, dataIdx), paramType, true);
return BfTypedValue(mModule->ExtractValue(methodRefTarget, dataIdx), paramType); return BfTypedValue(mModule->ExtractValue(methodRefTarget, dataIdx), paramType);
} }