mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Tuple variable initialization fix from splats
This commit is contained in:
parent
b1181a936d
commit
4b660b2314
1 changed files with 2 additions and 1 deletions
|
@ -2175,6 +2175,7 @@ void BfModule::HandleTupleVariableDeclaration(BfVariableDeclaration* varDecl, Bf
|
|||
initTupleType = (BfTypeInstance*)initTupleValue.mType;
|
||||
|
||||
CheckTupleVariableDeclaration(tupleExpr, initTupleValue.mType);
|
||||
mBfIRBuilder->PopulateType(initTupleValue.mType);
|
||||
|
||||
for (int varIdx = 0; varIdx < (int)tupleExpr->mValues.size(); varIdx++)
|
||||
{
|
||||
|
@ -2193,7 +2194,7 @@ void BfModule::HandleTupleVariableDeclaration(BfVariableDeclaration* varDecl, Bf
|
|||
initValue = LoadValue(initValue);
|
||||
}
|
||||
else
|
||||
initValue = BfTypedValue(mBfIRBuilder->CreateExtractValue(initTupleValue.mValue, fieldInstance->mDataIdx), resolvedType);
|
||||
initValue = ExtractValue(initTupleValue, fieldInstance, fieldInstance->mDataIdx);
|
||||
}
|
||||
|
||||
BfTupleNameNode* tupleNameNode = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue