- better fix for the class type problem: We already know the wanted type so let's use that instead of trying to determine it from the actual name.

This commit is contained in:
Christoph Oelckers 2016-10-22 19:51:24 +02:00
commit 32d33618ea
2 changed files with 4 additions and 11 deletions

View file

@ -364,12 +364,10 @@ public:
isresolved = true;
}
FxConstant(PClass *val, const FScriptPosition &pos) : FxExpression(pos)
FxConstant(PClass *val, PClassPointer *valtype, const FScriptPosition &pos) : FxExpression(pos)
{
value.pointer = (void*)val;
if (val != nullptr) ValueType = NewClassPointer(val);
else ValueType = NewClassPointer(RUNTIME_CLASS(DObject));
value.Type = NewClassPointer(RUNTIME_CLASS(DObject));
value.Type = ValueType = valtype;
isresolved = true;
}