1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed tuple actualization issue in Cast

This commit is contained in:
Brian Fiete 2025-01-21 12:06:09 -08:00
parent 67f8e45c55
commit 64f3cf9799

View file

@ -15130,6 +15130,7 @@ BfTypedValue BfModule::Cast(BfAstNode* srcNode, const BfTypedValue& typedVal, Bf
BfIRValue curTupleValue = CreateAlloca(tupleType);
auto loadedVal = LoadValue(typedVal);
FixValueActualization(loadedVal);
mBfIRBuilder->CreateStore(loadedVal.mValue, mBfIRBuilder->CreateBitCast(curTupleValue, mBfIRBuilder->MapTypeInstPtr(fromTupleType)));
return BfTypedValue(curTupleValue, tupleType, BfTypedValueKind_TempAddr);
}