- disabled default values for out parameters

https://forum.zdoom.org/viewtopic.php?t=61128
(cherry picked from commit 5d27c16f30)
This commit is contained in:
alexey.lysiuk 2018-06-30 11:44:22 +03:00 committed by drfrag666
parent 340afa4a40
commit e0b5af42f3

View file

@ -2533,6 +2533,11 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
}
else if (p->Default != nullptr)
{
if (flags & VARF_Out)
{
Error(p, "Out parameters cannot have default values");
}
flags |= VARF_Optional;
hasoptionals = true;