- fixed: Class pointers were accepted for objects of the base type 'Object'.

This commit is contained in:
Christoph Oelckers 2017-02-09 11:11:54 +01:00
parent 4dd7e02721
commit 4f0747c59e
1 changed files with 1 additions and 1 deletions

View File

@ -7863,7 +7863,7 @@ FxExpression *FxMemberFunctionCall::Resolve(FCompileContext& ctx)
return x->Resolve(ctx); return x->Resolve(ctx);
} }
if (Self->ValueType->IsKindOf(RUNTIME_CLASS(PPointer))) if (Self->ValueType->IsKindOf(RUNTIME_CLASS(PPointer)) && !Self->ValueType->IsKindOf(RUNTIME_CLASS(PClassPointer)))
{ {
auto ptype = static_cast<PPointer *>(Self->ValueType)->PointedType; auto ptype = static_cast<PPointer *>(Self->ValueType)->PointedType;
if (ptype->IsKindOf(RUNTIME_CLASS(PStruct))) if (ptype->IsKindOf(RUNTIME_CLASS(PStruct)))