mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed allowRef
for default values for failed local var inits
This commit is contained in:
parent
2130715f21
commit
faefc68cc0
1 changed files with 2 additions and 2 deletions
|
@ -1737,12 +1737,12 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
|||
if (isConst)
|
||||
{
|
||||
Fail("Const locals must be initialized", varDecl->mModSpecifier);
|
||||
initValue = GetDefaultTypedValue(resolvedType);
|
||||
initValue = GetDefaultTypedValue(resolvedType, true);
|
||||
}
|
||||
else if (isReadOnly)
|
||||
{
|
||||
Fail("Readonly locals must be initialized", varDecl->mModSpecifier);
|
||||
initValue = GetDefaultTypedValue(resolvedType);
|
||||
initValue = GetDefaultTypedValue(resolvedType, true);
|
||||
}
|
||||
else if (auto refTypeRef = BfNodeDynCast<BfRefTypeRef>(varDecl->mTypeRef))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue