1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed some var usage

This commit is contained in:
Brian Fiete 2019-11-02 06:02:36 -07:00
parent 54fa1e0811
commit e1656865bb
3 changed files with 24 additions and 37 deletions

View file

@ -1385,8 +1385,7 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
}
if (!initValue)
{
initValue = GetDefaultTypedValue(GetPrimitiveType(BfTypeCode_Var));
SetHadVarUsage();
initValue = GetDefaultTypedValue(GetPrimitiveType(BfTypeCode_Var));
}
if (initValue.mType->IsNull())
{
@ -5455,8 +5454,7 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
}
else if (isVarEnumerator)
{
// Generic method or mixin decl
BF_ASSERT(mBfIRBuilder->mIgnoreWrites || mHadVarUsage);
// Generic method or mixin decl
}
else if (!target.mType->IsTypeInstance())
{