- fixed: FxFloatCast must transfer the outer expression's value type to the inner expression if it performs a float->float cast.

This violated an important rule that a cast may not alter the expression's type and led to failed asserts elsewhere.
This commit is contained in:
Christoph Oelckers 2018-06-02 07:50:23 +02:00
parent 058c5426cd
commit 7d515e72c2

View file

@ -1060,6 +1060,7 @@ FxExpression *FxFloatCast::Resolve(FCompileContext &ctx)
if (basex->IsFloat())
{
FxExpression *x = basex;
x->ValueType = ValueType;
basex = nullptr;
delete this;
return x;