Skip to content

Commit

Permalink
- fix bug #2943 (the error was introduced in r23049)
Browse files Browse the repository at this point in the history
- added test: testsuite/openmodelica/interactive-API/Bug2943.mos


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23123 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 1, 2014
1 parent 08ba06d commit 7ce663d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Compiler/Script/Interactive.mo
Expand Up @@ -16338,7 +16338,9 @@ algorithm
end match;
end removeInnerDiffFiledClass;

protected function elementIsInFile
protected function classIsInFile
"returns true for the class that has the given filename
returns true for anything else which does not have a filename"
input String inFilename;
input Absyn.ElementItem inElement;
output Boolean outInFile;
Expand All @@ -16351,9 +16353,10 @@ algorithm
Absyn.CLASSDEF(class_ = Absyn.CLASS(info = Absyn.INFO(fileName = filename)))))
then stringEq(inFilename, filename);

else false;
else true;

end match;
end elementIsInFile;
end classIsInFile;

protected function removeClassDiffFiledInElementitemlist
"author: PA
Expand All @@ -16367,7 +16370,7 @@ protected function removeClassDiffFiledInElementitemlist
output list<Absyn.ElementItem> outElements;
algorithm
outElements := List.filterOnTrue(inElements,
function elementIsInFile(inFilename = inFilename));
function classIsInFile(inFilename = inFilename));
end removeClassDiffFiledInElementitemlist;

protected function getSurroundingPackage
Expand Down

0 comments on commit 7ce663d

Please sign in to comment.