mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- disabled default values for out parameters
https://forum.zdoom.org/viewtopic.php?t=61128
This commit is contained in:
parent
1d937b9f3c
commit
5d27c16f30
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue