- Prevent calling abstract functions via Super or parent class name qualifiers at compile time

This commit is contained in:
Player701 2020-10-19 12:03:03 +03:00 committed by Christoph Oelckers
parent 761dea8640
commit 63035d5031

View file

@ -8546,6 +8546,13 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
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;
if (ArgList.Size() > 0)