- disabled default values for out parameters

https://forum.zdoom.org/viewtopic.php?t=61128
This commit is contained in:
alexey.lysiuk 2018-06-30 11:44:22 +03:00
parent 1d937b9f3c
commit 5d27c16f30

View file

@ -2524,6 +2524,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;