mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-05-31 09:21:36 +00:00
Protected on methods of StaticEventHandler is completely useless
This commit is contained in:
parent
a43bc279a3
commit
9d4179ca06
3 changed files with 19 additions and 5 deletions
|
@ -6082,6 +6082,13 @@ FxExpression *FxIdentifier::ResolveMember(FCompileContext &ctx, PStruct *classct
|
|||
ScriptPosition.Message(MSG_ERROR, "Private member %s not accessible", vsym->SymbolName.GetChars());
|
||||
return nullptr;
|
||||
}
|
||||
PClass* cls_ctx = dyn_cast<PClass>(classctx);
|
||||
PClass* cls_target = dyn_cast<PClass>(objtype);
|
||||
if ((vsym->Flags & VARF_Protected) && (!cls_ctx || !cls_target || cls_ctx->IsDescendantOf(cls_target)))
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Protected member %s not accessible", vsym->SymbolName.GetChars());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto x = isclass ? new FxClassMember(object, vsym, ScriptPosition) : new FxStructMember(object, vsym, ScriptPosition);
|
||||
object = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue