- removed DSBarInfo::Scaled because it tended to disagree with StatusBar->Scaled.

This commit is contained in:
Christoph Oelckers 2017-03-29 00:35:35 +02:00
parent 2d1641f0cd
commit 19e7d60275
3 changed files with 14 additions and 30 deletions

View file

@ -8816,15 +8816,20 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
ArgList[i] = ArgList[i]->Resolve(ctx); // nust be resolved before the address is requested.
if (ArgList[i] != nullptr && ArgList[i]->ValueType != TypeNullPtr)
{
if (type != ArgList[i]->ValueType)
if (type == ArgList[i]->ValueType && type->IsA(RUNTIME_CLASS(PPointer)) && static_cast<PPointer*>(type)->IsA(RUNTIME_CLASS(PStruct)))
{
// trying to pass a struct reference as a struct refg
}
else
{
ArgList[i]->RequestAddress(ctx, &writable);
if (flag & VARF_Ref)ArgList[i]->ValueType = NewPointer(ArgList[i]->ValueType);
}
// For a reference argument the types must match 100%.
if (type != ArgList[i]->ValueType)
{
ScriptPosition.Message(MSG_ERROR, "Type mismatch in reference argument %s: %s != %s", Function->SymbolName.GetChars(), type->DescriptiveName(), ArgList[i]->ValueType->DescriptiveName());
ScriptPosition.Message(MSG_ERROR, "Type mismatch in reference argument %s", Function->SymbolName.GetChars());
x = nullptr;
}
else