- 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.

(cherry picked from commit 7d515e72c2)
This commit is contained in:
Christoph Oelckers 2018-06-02 07:50:23 +02:00 committed by drfrag666
parent 1e65eea77f
commit 6fe5af7c0c

View file

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