Skip to content

Commit

Permalink
- Bugfix for instClassDefHelper (used for MetaModelica, TCOMPLEX, types)
Browse files Browse the repository at this point in the history
  - Do lookupType instead of lookupClass for functions


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6984 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 12, 2010
1 parent 03749a2 commit 4a7818a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Compiler/Inst.mo
Expand Up @@ -4139,12 +4139,21 @@ algorithm
case (cache,env,ih, Absyn.TPATH(cn,_) :: restTypeSpecs,pre,dims,impl,localAccTypes,csets)
equation
(cache,(c as SCode.CLASS(name = _)),cenv) = Lookup.lookupClass(cache,env, cn, true);
false = SCode.isFunction(c);
(cache,cenv,ih,_,_,csets,ty,_,oDA,_)=instClass(cache,cenv,ih,UnitAbsyn.noStore,DAE.NOMOD(),pre,csets,c,dims,impl,INNER_CALL(), ConnectionGraph.EMPTY);
localAccTypes = ty::localAccTypes;
(cache,env,ih,localAccTypes,csets,_) =
instClassDefHelper(cache,env,ih,restTypeSpecs,pre,dims,impl,localAccTypes,csets);
then (cache,env,ih,localAccTypes,csets,oDA);

case (cache,env,ih, Absyn.TPATH(cn,_) :: restTypeSpecs,pre,dims,impl,localAccTypes,csets)
equation
(cache,ty,_) = Lookup.lookupType(cache,env,cn,NONE()) "For functions, etc";
localAccTypes = ty::localAccTypes;
(cache,env,ih,localAccTypes,csets,_) =
instClassDefHelper(cache,env,ih,restTypeSpecs,pre,dims,impl,localAccTypes,csets);
then (cache,env,ih,localAccTypes,csets,NONE());

case (cache,env,ih, (tSpec as Absyn.TCOMPLEX(p,_,_)) :: restTypeSpecs,pre,dims,impl,localAccTypes,csets)
equation
id=Absyn.pathString(p);
Expand Down

0 comments on commit 4a7818a

Please sign in to comment.