mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- Prevent calling abstract functions via Super or parent class name qualifiers at compile time
This commit is contained in:
parent
761dea8640
commit
63035d5031
1 changed files with 7 additions and 0 deletions
|
@ -8546,6 +8546,13 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
|
||||||
if (!result) return nullptr;
|
if (!result) return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [Player701] Catch attempts to call abstract functions directly at compile time
|
||||||
|
if (NoVirtual && Function->Variants[0].Implementation->VarFlags & VARF_Abstract)
|
||||||
|
{
|
||||||
|
ScriptPosition.Message(MSG_ERROR, "Cannot call abstract function %s", Function->Variants[0].Implementation->PrintableName.GetChars());
|
||||||
|
delete this;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
CallingFunction = ctx.Function;
|
CallingFunction = ctx.Function;
|
||||||
if (ArgList.Size() > 0)
|
if (ArgList.Size() > 0)
|
||||||
|
|
Loading…
Reference in a new issue