Skip to content

Commit

Permalink
- Fixed correct scope type when adding new classes to the environment in
Browse files Browse the repository at this point in the history
  SCodeFlatten.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7841 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Feb 1, 2011
1 parent d08c03d commit a767bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/SCodeEnv.mo
Expand Up @@ -358,7 +358,7 @@ algorithm

case (SCode.CLASS(name = cls_name, classDef = cdef), _)
equation
class_env = newEnvironment(SOME(cls_name));
class_env = openScope(emptyEnv, inClass);
class_env = extendEnvWithClassComponents(cls_name, cdef, class_env);
env = extendEnvWithItem(CLASS(inClass, class_env), inEnv, cls_name);
then
Expand Down Expand Up @@ -1085,7 +1085,7 @@ algorithm
case (_, SCode.CLASSDEF(classDef = cls as SCode.CLASS(classDef = cdef)),
FRAME(name, ty, tree, exts, imps) :: env)
equation
class_env = newEnvironment(SOME(inElementName));
class_env = openScope(emptyEnv, cls);
class_env = extendEnvWithClassComponents(inElementName, cdef, class_env);
tree = avlTreeReplace(tree, inElementName, CLASS(cls, class_env));
then
Expand Down

0 comments on commit a767bd1

Please sign in to comment.