Forráskód Böngészése

Tuple variable initialization fix from splats

Brian Fiete 6 hónapja
szülő
commit
4b660b2314
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      IDEHelper/Compiler/BfStmtEvaluator.cpp

+ 2 - 1
IDEHelper/Compiler/BfStmtEvaluator.cpp

@@ -2175,6 +2175,7 @@ void BfModule::HandleTupleVariableDeclaration(BfVariableDeclaration* varDecl, Bf
 		initTupleType = (BfTypeInstance*)initTupleValue.mType;
 		initTupleType = (BfTypeInstance*)initTupleValue.mType;
 
 
 	CheckTupleVariableDeclaration(tupleExpr, initTupleValue.mType);
 	CheckTupleVariableDeclaration(tupleExpr, initTupleValue.mType);
+	mBfIRBuilder->PopulateType(initTupleValue.mType);
 
 
 	for (int varIdx = 0; varIdx < (int)tupleExpr->mValues.size(); varIdx++)
 	for (int varIdx = 0; varIdx < (int)tupleExpr->mValues.size(); varIdx++)
 	{
 	{
@@ -2193,7 +2194,7 @@ void BfModule::HandleTupleVariableDeclaration(BfVariableDeclaration* varDecl, Bf
 					initValue = LoadValue(initValue);
 					initValue = LoadValue(initValue);
 				}
 				}
 				else
 				else
-					initValue = BfTypedValue(mBfIRBuilder->CreateExtractValue(initTupleValue.mValue, fieldInstance->mDataIdx), resolvedType);
+					initValue = ExtractValue(initTupleValue, fieldInstance, fieldInstance->mDataIdx);					
 			}
 			}
 
 
 			BfTupleNameNode* tupleNameNode = NULL;
 			BfTupleNameNode* tupleNameNode = NULL;