Skip to content

Commit

Permalink
fix for ticket:3979
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Sep 22, 2016
1 parent f0f37a3 commit 4f0d761
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/FrontEnd/Lookup.mo
Expand Up @@ -1746,6 +1746,10 @@ algorithm
equation
cr = lookupQualifiedImportedVarInFrame(qimports, id);
Util.setStatefulBoolean(inState,true);
// if the first name of the import A.B is equal with the scope we are in, skip it!
cr = if FNode.name(FNode.fromRef(FGraph.lastScopeRef(env))) == ComponentReference.crefFirstIdent(cr)
then ComponentReference.crefStripFirstIdent(cr)
else cr;
f::prevFrames = listReverse(FGraph.currentScope(env));
env = FGraph.setScope(env, {f});
(cache,p_env,attr,ty,bind,cnstForRange,splicedExpData,componentEnv,name) = lookupVarInPackages(cache,env,cr,prevFrames,inState);
Expand Down

0 comments on commit 4f0d761

Please sign in to comment.