Removed nonew class modifier
This commit is contained in:
parent
78533cc316
commit
3a57a9809f
9 changed files with 7 additions and 41 deletions
|
|
@ -5095,19 +5095,6 @@ FxExpression *FxNew::Resolve(FCompileContext &ctx)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (cls->ObjectFlags & OF_NoNew)
|
||||
{
|
||||
PClass* pcls = cls;
|
||||
while (pcls && pcls->ParentClass && (pcls->ParentClass->ObjectFlags & OF_NoNew))
|
||||
pcls = pcls->ParentClass;
|
||||
if (pcls != ctx.Class)
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Cannot instantiate class %s directly", cls->TypeName.GetChars());
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
ValueType = NewPointer(cls);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue