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

Fixed return of a 'var'

This commit is contained in:
Brian Fiete 2020-03-10 08:27:57 -07:00
parent 1c8a2a8e44
commit 1de552e940

View file

@ -4772,7 +4772,11 @@ void BfModule::Visit(BfReturnStatement* returnStmt)
}
}
if (retValue.mType->IsVoid())
if (retValue.mType->IsVar())
{
EmitReturn(BfIRValue());
}
else if (retValue.mType->IsVoid())
{
if (retType->IsVoid())
{