- fixed: DECORATE tried to resolved null states again, causing a type conflict.

This commit is contained in:
Christoph Oelckers 2016-11-15 14:53:01 +01:00
parent d4d6b739e0
commit 97e643c7e1

View file

@ -477,9 +477,12 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
exp = new FxRuntimeStateIndex(ParseExpressionM(sc, cls)); exp = new FxRuntimeStateIndex(ParseExpressionM(sc, cls));
} }
// The parsed expression is of type 'statelabel', but we want a real state here so we must convert it. // The parsed expression is of type 'statelabel', but we want a real state here so we must convert it.
FArgumentList args; if (!exp->isConstant())
args.Push(exp); {
exp = new FxFunctionCall(NAME_ResolveState, NAME_None, args, sc); FArgumentList args;
args.Push(exp);
exp = new FxFunctionCall(NAME_ResolveState, NAME_None, args, sc);
}
sc.MustGetToken(')'); sc.MustGetToken(')');
return exp; return exp;
} }