Opened 14 years ago
Last modified 14 years ago
#1250 closed defect (fixed)
Integer() of enumeration value fails to flatten.
Reported by: | Peter Aronsson | Owned by: | Peter Aronsson |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Peter Aronsson, |
Description
the Integer() function is not implemented for enumerations.
{{{model Enumtest
type MyEnum=enumeration(A,B,C);
MyEnum A=MyEnum.A;
Integer i = Integer(A);
end Enumtest;}}}
Results in the following message:
{{{Error processing file: Enumtest.mo
Error: No matching function found for Integer(A) of type function(x:enumeration(A, B, C)) => Integer, candidates are function(x:enumeration()) => Integer
Error: Wrong type or wrong number of arguments to Integer(A)'.
}}}
Note:
See TracTickets
for help on using tickets.
(MathCore TRAC: http://intranet/trac/mathmodelica/ticket/2934)