Skip to content

Commit

Permalink
Fix for bug #1621:
Browse files Browse the repository at this point in the history
- Handle enumerations inside modified models correctly.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9911 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 23, 2011
1 parent 70f68a6 commit 8a6cd47
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -5881,6 +5881,16 @@ algorithm
SCode.Replaceable rpp;

case (env,ih,pre,{},_,_) then (env,ih);

// we have a redeclaration of an enumeration.
case (env,ih,pre,( (sel1 as SCode.CLASS(name = s, classDef=SCode.ENUMERATION(enumLst,cmt),info=info)) :: xs),impl,redeclareMod as SOME(_))
equation
enumclass = instEnumeration(s, enumLst, cmt, info);
env_1 = Env.extendFrameC(env, enumclass);
(env_1,ih,cl2) = addClassdefsToEnv3(env_1, ih, pre, redeclareMod, sel1);
(env_2,ih) = addClassdefsToEnv2(env_1, ih, pre, xs, impl, redeclareMod);
then
(env_2,ih);

// we do have a redeclaration of class.
case (env,ih,pre,( (sel1 as SCode.CLASS(name = s)) :: xs),impl,redeclareMod as SOME(_))
Expand Down

0 comments on commit 8a6cd47

Please sign in to comment.