Skip to content

Commit

Permalink
- Fix compilation.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13987 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Nov 20, 2012
1 parent bf001f1 commit 3dda9d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions Compiler/FrontEnd/InstSymbolTable.mo
Expand Up @@ -263,7 +263,7 @@ algorithm
Absyn.Path name;

// A basic type doesn't have any components, nothing to add.
case (InstTypes.BASIC_TYPE(name), st) then (inClass, st);
case (InstTypes.BASIC_TYPE(name), st) then st;

// A complex class, add its components to the symboltable.
case (InstTypes.COMPLEX_CLASS(components = comps), st)
Expand Down Expand Up @@ -318,20 +318,19 @@ public function addClassOnTrue
input Class inClass;
input SymbolTable inSymbolTable;
input Boolean inCondition;
output Class outClass;
output SymbolTable outSymbolTable;
algorithm
(outClass, outSymbolTable) := match(inClass, inSymbolTable, inCondition)
outSymbolTable := match(inClass, inSymbolTable, inCondition)
local
Class cls;
SymbolTable st;

case (cls, st, false) then (cls, st);
case (cls, st, false) then st;
case (cls, st, true)
equation
(cls, st) = addClass(cls, st);
st = addClass(cls, st);
then
(cls, st);
st;

end match;
end addClassOnTrue;
Expand Down Expand Up @@ -591,7 +590,7 @@ algorithm
// Try to add the component to the symboltable.
(st, added) = addInstCondComponent(name, comp, opt_comp, st);
// Add the element's class if the component was added.
(cls, st) = addClassOnTrue(cls, st, added);
st = addClassOnTrue(cls, st, added);
then
(st, added);

Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/SCodeInst.mo
Expand Up @@ -2297,7 +2297,7 @@ algorithm
(elem, (consts, funcs)) = instElement(selem, InstTypes.NOMOD(),
InstTypes.NO_PREFIXES(), env, InstTypes.emptyPrefix, INST_ALL(), inGlobals);

(_, consts) = InstSymbolTable.addElement(elem, consts);
consts = InstSymbolTable.addElement(elem, consts);
then
((consts, funcs));

Expand Down Expand Up @@ -2344,7 +2344,7 @@ algorithm
(elem, (consts, funcs)) = instElement(selem, InstTypes.NOMOD(),
InstTypes.NO_PREFIXES(), env, prefix, INST_ALL(), inGlobals);

(_, consts) = InstSymbolTable.addElement(elem, consts);
consts = InstSymbolTable.addElement(elem, consts);
then
((consts, funcs));

Expand Down

0 comments on commit 3dda9d8

Please sign in to comment.