Skip to content

Commit

Permalink
- Fix and add testcase for Integer() of enum
Browse files Browse the repository at this point in the history
- Fixes bug #1250


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5958 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 26, 2010
1 parent f8ba685 commit 7e90ffe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/DAE.mo
Expand Up @@ -671,7 +671,7 @@ public uniontype TType "-TType contains the actual type"
list<Var> varLstBool;
end T_BOOL;

record T_ENUMERATION
record T_ENUMERATION "If the list of names is empty, this is the super-enumeration that is the super-class of all enumerations"
Option<Integer> index "the enumeration value index, SOME for element, NONE for type" ;
Absyn.Path path "enumeration path" ;
list<String> names "names" ;
Expand Down
1 change: 1 addition & 0 deletions Compiler/Types.mo
Expand Up @@ -1435,6 +1435,7 @@ algorithm
res;

case ((DAE.T_ENUMERATION(names = {}),_),(DAE.T_ENUMERATION(names = _),_)) then true;
case ((DAE.T_ENUMERATION(names = _),_),(DAE.T_ENUMERATION(names = {}),_)) then true;

case ((DAE.T_ARRAY(arrayType = t1),_),(DAE.T_ARRAY(arrayDim = DAE.DIM(integerOption = NONE),arrayType = t2),_))
equation
Expand Down

0 comments on commit 7e90ffe

Please sign in to comment.