Opened 7 months ago

Closed 6 months ago

#5772 closed defect (fixed)

ClassCastException from alias rewrite

Reported by: Jonathan Kämpe Owned by: Jonathan Kämpe
Priority: major Milestone:
Component: Modelica/FrontEnd Version: trunk
Keywords: Cc:

Description

The following mode

        Real x;
        Real y = -x;
    algorithm
        x := time;

Gives the following exception

Exception in thread "main" java.lang.ClassCastException: org.jmodelica.modelica.compiler.FNegExp cannot be cast to org.jmodelica.modelica.compiler.FAssignableExp
	at org.jmodelica.modelica.compiler.FAssignStmt.getLeft(FAssignStmt.java:627)
	at org.jmodelica.modelica.compiler.FAssignStmt.rewriteTo(FAssignStmt.java:1021)
	at org.jmodelica.modelica.compiler.ASTNode.getChild(ASTNode.java:4851)

Change History (2)

comment:1 Changed 7 months ago by Jonathan Kämpe

r12853 Fixed exception from negated alias in assign statement left hand side.
r12858 Merging r12853 to trunk. Fixed exception from negated alias in assign statement left hand side.

comment:2 Changed 6 months ago by Jonathan Kämpe

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.