Modelica-Compliance icon indicating copy to clipboard operation
Modelica-Compliance copied to clipboard

StateSelect not a reserved keyword?

Open maltelenz opened this issue 3 years ago • 1 comments

There are these two test cases: https://github.com/modelica/Modelica-Compliance/blob/master/ModelicaCompliance/Classes/Predefined/ReservedStateSelectClass.mo https://github.com/modelica/Modelica-Compliance/blob/master/ModelicaCompliance/Classes/Predefined/ReservedStateSelectComp.mo

but the way I read 4.8 in the specification, it doesn't actually prohibit these?

maltelenz avatar May 13 '22 08:05 maltelenz

This was changed in Modelica 3.4, in prior versions the opening paragraph of 4.8 just stated:

Redeclaration of any of these types is an error, and the names are reserved such that it is illegal to declare an element with these names.

The test cases were written with the assumption that this rule applied to all the predefined types, but since Modelica 3.4 this has been clarified to only apply to Real, Integer, Boolean and String. So I guess the similar test cases for ExternalObject should also be changed in that case: https://github.com/modelica/Modelica-Compliance/blob/master/ModelicaCompliance/Classes/Predefined/ReservedExternalObjectClass.mo https://github.com/modelica/Modelica-Compliance/blob/master/ModelicaCompliance/Classes/Predefined/ReservedExternalObjectComp.mo

perost avatar May 13 '22 08:05 perost