Skip to content

Commit

Permalink
- More RML fixes (RML seems to be making errors up now).
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22845 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Oct 21, 2014
1 parent 8c7c8d2 commit 48413dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Compiler/Script/GlobalScriptUtil.mo
Expand Up @@ -312,7 +312,7 @@ protected function addVarToEnv
algorithm
outEnv := matchcontinue(inVariable, inEnv)
local
FCore.Graph env;
FCore.Graph env, empty_env;
String id;
Values.Value v;
DAE.Type tp;
Expand All @@ -321,6 +321,7 @@ algorithm
case (GlobalScript.IVAR(varIdent = id, value = v, type_ = tp), env)
equation
cref = ComponentReference.makeCrefIdent(id, DAE.T_UNKNOWN_DEFAULT, {});
empty_env = FGraph.empty();
(_,_,_,_,_,_,_,_,_) = Lookup.lookupVar(FCore.emptyCache(), env, cref);
env = FGraph.updateComp(
env,
Expand All @@ -331,12 +332,13 @@ algorithm
DAE.VALBOUND(v, DAE.BINDING_FROM_DEFAULT_VALUE()),
NONE()),
FCore.VAR_TYPED(),
FGraph.empty());
empty_env);
then
env;

case (GlobalScript.IVAR(varIdent = id, value = v, type_ = tp), env)
equation
empty_env = FGraph.empty();
env = FGraph.mkComponentNode(
env,
DAE.TYPES_VAR(id,DAE.dummyAttrVar,tp,DAE.VALBOUND(v,DAE.BINDING_FROM_DEFAULT_VALUE()),NONE()),
Expand All @@ -348,7 +350,7 @@ algorithm
SCode.noComment, NONE(), Absyn.dummyInfo),
DAE.NOMOD(),
FCore.VAR_UNTYPED(),
FGraph.empty());
empty_env);
then
env;

Expand Down

0 comments on commit 48413dc

Please sign in to comment.