Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2400 closed defect (fixed)

Values.RECORD cannot represent records

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: blocker Milestone: 1.9.0
Component: Frontend Version: trunk
Keywords: Cc: openmodelicadevelopers@…, Peter Aronsson, Leonardo Laguna

Description

Values.RECORD contains only a list of names and values. But in order to convert a value to expression, we need to remove protected variables since they do should not be passed to the record.

This affects Modelica.Electrical.Spice3.Examples.Nor (which for some reason compiles using gcc anyway; probably it thinks the empty argument to the list means varargs). Regardless, it needs to be fixed.

Change History (6)

comment:1 by Martin Sjölund, 11 years ago

Owner: changed from somebody to Martin Sjölund
Status: newassigned

comment:2 by Martin Sjölund, 11 years ago

Cc: openmodelicadevelopers@… Peter Aronsson Leonardo Laguna added
Resolution: fixed
Status: assignedclosed

Fixed in r17553, but note that the changes made since DAE.mo changed! Code generation needs to be updated, etc.

comment:3 by carlj@…, 11 years ago

In which cases will code like

   Complex(<expression>,<expression>)

be interpreted as a DAE.CALL to the Complex constructor and which cases will it be interpreted as a DAE.RECORD?

comment:4 by Martin Sjölund, 11 years ago

Currently, anything translated from Values.RECORD back will be using a DAE.RECORD. In the future, I aim to remove DAE.CALL to the constructor function (and the constructor function itself) from the DAE since it does not really work like a normal function.

comment:5 by carlj@…, 11 years ago

Under what conditions is something translated from Values.RECORD?

comment:6 by Martin Sjölund, 11 years ago

Pretty much always after ceval.

Note: See TracTickets for help on using tickets.