Skip to content

Commit

Permalink
Revert fix for #3386, since it doesn't work correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed Aug 26, 2015
1 parent cf16403 commit e03b065
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 159 deletions.
23 changes: 0 additions & 23 deletions Compiler/FrontEnd/Lookup.mo
Expand Up @@ -1333,8 +1333,6 @@ algorithm
then ();
end match;
(cache,p_env,attr,ty,bind,cnstForRange,splicedExpData,componentEnv,name) = lookupVarInPackages(cache,env5,cref,prevFrames,inState);
// Add the class name to the spliced exp so that the name is correct.
splicedExpData = prefixSplicedExp(ComponentReference.crefFirstCref(inComponentRef), splicedExpData);
then
(cache,p_env,attr,ty,bind,cnstForRange,splicedExpData,componentEnv,name);

Expand Down Expand Up @@ -3199,26 +3197,5 @@ algorithm
end matchcontinue;
end isFunctionCallViaComponent;

protected function prefixSplicedExp
"Prefixes a spliced exp that contains a cref with another cref."
input DAE.ComponentRef inCref;
input InstTypes.SplicedExpData inSplicedExp;
output InstTypes.SplicedExpData outSplicedExp;
algorithm
outSplicedExp := match inSplicedExp
local
DAE.Type ety, ty;
DAE.ComponentRef cref;

case InstTypes.SPLICEDEXPDATA(SOME(DAE.CREF(cref, ety)), ty)
algorithm
cref := ComponentReference.joinCrefs(inCref, cref);
then
InstTypes.SPLICEDEXPDATA(SOME(DAE.CREF(cref, ety)), ty);

else inSplicedExp;
end match;
end prefixSplicedExp;

annotation(__OpenModelica_Interface="frontend");
end Lookup;

0 comments on commit e03b065

Please sign in to comment.