Skip to content

Commit

Permalink
Fixed weird Lookup "bug".
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4590 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Björn Zachrisson committed Nov 27, 2009
1 parent 51e93af commit de00dbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/Lookup.mo
Expand Up @@ -1551,7 +1551,9 @@ algorithm
equation
// adrpo: do not search in the entire environment as we anyway recurse with the fs argument!
// just search in {f} not f::fs as otherwise we might get us in an infinite loop
(cache,(c as SCode.CLASS(id,_,encflag,restr,_)),env_1) = lookupClass2(cache, {f} /* f::fs */, iid, false);
// Bjozac: Readded the f::fs search frame, otherwise we might get caught in a inifinite loop!
// Did not investigate this further then that it can crasch the kernel.
(cache,(c as SCode.CLASS(id,_,encflag,restr,_)),env_1) = lookupClass2(cache,f::fs, iid, false);
true = SCode.isFunctionOrExtFunction(restr);
(cache,(env_2 as (Env.FRAME(optName = sid,clsAndVars = ht,types = httypes)::_)),_)
= Inst.implicitFunctionTypeInstantiation(cache,env_1,InstanceHierarchy.emptyInstanceHierarchy, c);
Expand Down

0 comments on commit de00dbf

Please sign in to comment.