Skip to content

Commit

Permalink
- Fix bootstrapping
Browse files Browse the repository at this point in the history
- Fix ThermoSysPro library errors
- Disable within checks for language standard 1.x


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12471 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 10, 2012
1 parent 248f7c3 commit b24c1a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Absyn.mo
Expand Up @@ -5341,7 +5341,7 @@ public function withinString
input Within w1;
output String str;
algorithm
b := match (w1)
str := match (w1)
local
Path p1;
case (TOP()) then "within ;";
Expand Down
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/ClassLoader.mo
Expand Up @@ -417,16 +417,16 @@ algorithm
case (name,encoding,w1,pack)
equation
true = System.regularFileExists(name);
(p as Absyn.PROGRAM(cs,w2,ts)) = Parser.parse(name,encoding);
Absyn.PROGRAM(cs,w2,ts) = Parser.parse(name,encoding);
classNames = List.map(cs, Absyn.getClassName);
str = stringDelimitList(classNames,", ");
Error.assertionOrAddSourceMessage(listLength(cs)==1, Error.LIBRARY_ONE_PACKAGE_PER_FILE, {str}, Absyn.INFO(name,true,0,0,0,0,ts));
Absyn.CLASS(name=cname,info=info)::{} = cs;
Error.assertionOrAddSourceMessage(stringEqual(cname,pack), Error.LIBRARY_UNEXPECTED_NAME, {pack,cname}, info);
s1 = Absyn.withinString(w1);
s2 = Absyn.withinString(w2);
Error.assertionOrAddSourceMessage(Absyn.withinEqual(w1,w2), Error.LIBRARY_UNEXPECTED_WITHIN, {s1,s2}, info);
then p;
Error.assertionOrAddSourceMessage(Absyn.withinEqual(w1,w2) or Config.languageStandardAtMost(Config.MODELICA_1_X), Error.LIBRARY_UNEXPECTED_WITHIN, {s1,s2}, info);
then Absyn.PROGRAM(cs,w1 /* Modelica 1.x did not keep within */,ts);

// faliling
else
Expand Down
5 changes: 2 additions & 3 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -5727,10 +5727,10 @@ end isConst;
protected function isConstWork
"Returns true if an expression is constant"
input DAE.Exp inExp;
input Boolean res;
input Boolean inRes;
output Boolean outBoolean;
algorithm
outBoolean := match (inExp,res)
outBoolean := match (inExp,inRes)
local
Boolean res;
Operator op;
Expand Down Expand Up @@ -5801,7 +5801,6 @@ protected function isConstValueWork
algorithm
outBoolean := match (inExp,res)
local
Boolean res;
Operator op;
DAE.Exp e,e1,e2;
Type t;
Expand Down
1 change: 0 additions & 1 deletion Compiler/FrontEnd/SCodeUtil.mo
Expand Up @@ -223,7 +223,6 @@ algorithm
Option<SCode.Comment> scodeCmt;
SCode.Ident opName;
list<Absyn.Path> opFuncNames;
Absyn.Info info;

case (Absyn.PARTS(classParts = parts,comment = cmtString),opName,info)
equation
Expand Down

0 comments on commit b24c1a0

Please sign in to comment.