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

Fixed result-of-tuple crash

This commit is contained in:
Brian Fiete 2020-06-19 06:40:40 -07:00
parent 3863166545
commit 407c742bf9
2 changed files with 19 additions and 8 deletions

View file

@ -10224,6 +10224,7 @@ BfTypedValue BfModule::Cast(BfAstNode* srcNode, const BfTypedValue& typedVal, Bf
if (!castedElementVal)
return BfTypedValue();
auto fieldRef = mBfIRBuilder->CreateInBoundsGEP(curTupleValue, 0, toFieldInstance->mDataIdx);
castedElementVal = LoadValue(castedElementVal);
mBfIRBuilder->CreateStore(castedElementVal.mValue, fieldRef);
}
else