compiler/libec: Fixed disappearing cast on units within brackets
authorJerome St-Louis <jerome@ecere.com>
Wed, 6 Aug 2014 22:54:08 +0000 (18:54 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 6 Aug 2014 22:54:08 +0000 (18:54 -0400)
- Radians b = Degrees { 30 }; int ixX = (int)(b);

compiler/bootstrap/libec/bootstrap/pass15.c
compiler/libec/src/pass15.ec

index cdddb48..3bc7da5 100644 (file)
@@ -17070,6 +17070,7 @@ if(!exp->expType && !e->next)
 exp->expType = e->expType;
 if(e->expType)
 e->expType->refCount++;
+exp->needCast = e->needCast;
 }
 if(!e->isConstant)
 exp->isConstant = 0;
index 11d2ef1..edb9e63 100644 (file)
@@ -9250,6 +9250,7 @@ void ProcessExpressionType(Expression exp)
             {
                exp.expType = e.expType;
                if(e.expType) e.expType.refCount++;
+               exp.needCast = e.needCast;
             }
             if(!e.isConstant)
                exp.isConstant = false;