Skip to content

Commit

Permalink
- fix bootstrapping
Browse files Browse the repository at this point in the history
- strangely SOME(outRules) := getGlobalRoot(Global.rewriteRulesIndex); 
  does not work directly in the bootstrapped compiler, 
  you get: Error: Invalid pattern: SOME(rules) of type ##T_UNKNOWN#



git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18834 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Jan 29, 2014
1 parent 66a2bd9 commit 6ff3ce8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/Script/RewriteRules.mo
Expand Up @@ -82,7 +82,7 @@ algorithm
outExp := match(inExp)
local
Rules rules;
case (inExp)
case (_)
equation
rules = getRules();
outExp = matchAndRewriteExp(inExp, rules);
Expand Down Expand Up @@ -614,8 +614,11 @@ end clearRules;
public function getRules
"get the loaded rules"
output Rules outRules;
protected
Option<Rules> orules;
algorithm
SOME(outRules) := getGlobalRoot(Global.rewriteRulesIndex);
orules := getGlobalRoot(Global.rewriteRulesIndex);
SOME(outRules) := orules;
end getRules;

protected function parse
Expand Down

0 comments on commit 6ff3ce8

Please sign in to comment.