Opened 12 years ago

Closed 12 years ago

#2215 closed defect (fixed)

Unparsing of unary minus

Reported by: Adrian Pop Owned by: Per Östlund
Priority: high Milestone: 1.9.0
Component: Interactive Environment Version: trunk
Keywords: Cc: fedebergero@…

Description

Bug reported by Frederico Bergero.
When I manually type the following model in OMEdit

model m
  Real x;
equation
  x = 1 + (-3);
end m;

and try to save it, OMEdit seems to evaluate the model and leave it as:

model m
  Real x;
equation
  x = 1 + -3;
end m;

Change History (3)

comment:1 by Adrian Pop, 12 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

comment:2 by Adrian Pop, 12 years ago

Owner: changed from Adrian Pop to Per Östlund
Status: acceptedassigned

comment:3 by Per Östlund, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r16301. Dump now uses the same parenthesize algorithm as ExpressionDump, which is a lot smarter with how parentheses are placed.

Note: See TracTickets for help on using tickets.