- fixed a conversion warning with the pointer-type AActor fields.
- added master and tracer to the list of exported variables. - fixed: 'none' as class type must map to the real null pointer so that it won't get rejected by the stricter type checks. - added handling for member function calls to zcc_compile.cpp. - fixed: FxMemberFunctionCall may not delete the self expression if it gets passed on to the actual function call.
This commit is contained in:
parent
37914223f0
commit
c2b37aeeea
5 changed files with 17 additions and 3 deletions
|
|
@ -4975,6 +4975,7 @@ FxExpression *FxMemberFunctionCall::Resolve(FCompileContext& ctx)
|
|||
auto self = !(afd->Variants[0].Flags & VARF_Static) ? Self : nullptr;
|
||||
auto x = new FxVMFunctionCall(self, afd, ArgList, ScriptPosition, staticonly);
|
||||
ArgList = nullptr;
|
||||
if (Self == self) Self = nullptr;
|
||||
delete this;
|
||||
return x->Resolve(ctx);
|
||||
}
|
||||
|
|
@ -6226,6 +6227,7 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
FName clsname = static_cast<FxConstant *>(basex)->GetValue().GetName();
|
||||
PClass *cls = NULL;
|
||||
FxExpression *x;
|
||||
|
||||
if (clsname != NAME_None)
|
||||
{
|
||||
|
|
@ -6248,8 +6250,12 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx)
|
|||
}
|
||||
ScriptPosition.Message(MSG_DEBUG, "resolving '%s' as class name", clsname.GetChars());
|
||||
}
|
||||
x = new FxConstant(cls, ScriptPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = new FxConstant(ScriptPosition); // create a genuine null pointer to get past the type checks.
|
||||
}
|
||||
FxExpression *x = new FxConstant(cls, ScriptPosition);
|
||||
delete this;
|
||||
return x;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue