Skip to content

Commit

Permalink
Fix pretty-printing of negative real literals
Browse files Browse the repository at this point in the history
This fixes ticket:4503.

Belonging to [master]:
  - OpenModelica/OMCompiler#2096
  - OpenModelica/OpenModelica-testsuite#813
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Jan 4, 2018
1 parent bd8571d commit 25d84d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -10514,6 +10514,7 @@ algorithm

case (DAE.BINARY(operator = op), false) then priorityBinopRhs(op);
case (DAE.BINARY(operator = op), true) then priorityBinopLhs(op);
case (DAE.RCONST(), _) guard inExp.real < 0.0 then 4; // Same as unary minus of a real literal
case (DAE.UNARY(), _) then 4;
case (DAE.LBINARY(operator = op), _) then priorityLBinop(op);
case (DAE.LUNARY(), _) then 7;
Expand Down

0 comments on commit 25d84d4

Please sign in to comment.