Skip to content

Commit

Permalink
- Tail recursion
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13899 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 15, 2012
1 parent 4bb3ae6 commit f997c47
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Compiler/FrontEnd/Inst.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4322,12 +4322,13 @@ protected function hasExtendsOfExternalObject
input list<SCode.Element> inEls;
output Boolean res;
algorithm
res:= matchcontinue(inEls)
local list<SCode.Element> els;
res:= match (inEls)
local
list<SCode.Element> els;
case {} then false;
case SCode.EXTENDS(baseClassPath = Absyn.IDENT("ExternalObject"))::_ then true;
case _::els then hasExtendsOfExternalObject(els);
case _ then false;
end matchcontinue;
end match;
end hasExtendsOfExternalObject;

protected function hasExternalObjectDestructor
Expand Down

0 comments on commit f997c47

Please sign in to comment.