From 72a449e7c5cc871f351e09b3c77bb0a13321eaf1 Mon Sep 17 00:00:00 2001 From: Peter Aronsson Date: Thu, 11 May 2006 11:46:49 +0000 Subject: [PATCH] Fixed MC bug #588 git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2362 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- Compiler/Interactive.mo | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Compiler/Interactive.mo b/Compiler/Interactive.mo index 48cef978039..729cf6a5ced 100644 --- a/Compiler/Interactive.mo +++ b/Compiler/Interactive.mo @@ -3955,13 +3955,19 @@ protected function getClassEnv "function: getClassEnv SCode.Restriction restr; ClassInf.State ci_state; algorithm - p_1 := SCode.elaborate(p); - env := Inst.makeEnvFromProgram(p_1, Absyn.IDENT("")); - ((cl as SCode.CLASS(id,_,encflag,restr,_)),env_1) := Lookup.lookupClass(env, p_class, false); - env2 := Env.openScope(env_1, encflag, SOME(id)); - ci_state := ClassInf.start(restr, id); - (env_2,_) := Inst.partialInstClassIn(env2, Types.NOMOD(), Prefix.NOPRE(), Connect.emptySet, + env_2 := matchcontinue (p,p_class) + case (p,p_class) + equation + p_1 = SCode.elaborate(p); + env = Inst.makeEnvFromProgram(p_1, Absyn.IDENT("")); + ((cl as SCode.CLASS(id,_,encflag,restr,_)),env_1) = Lookup.lookupClass(env, p_class, false); + env2 = Env.openScope(env_1, encflag, SOME(id)); + ci_state = ClassInf.start(restr, id); + (env_2,_) = Inst.partialInstClassIn(env2, Types.NOMOD(), Prefix.NOPRE(), Connect.emptySet, ci_state, cl, false, {}); + then env_2; + case (p,p_class) then {}; + end matchcontinue; end getClassEnv; protected function getClassEnvNoElaboration "function: getClassEnvNoElaboration