Skip to content

Commit

Permalink
- Fixed bug in SCodeFlatten.qualifyRedeclare where the merged path wa…
Browse files Browse the repository at this point in the history
…s incorrect.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7771 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Jan 25, 2011
1 parent 0fcde28 commit 2d127f0
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Compiler/FrontEnd/SCodeFlatten.mo
Expand Up @@ -693,7 +693,7 @@ algorithm
case (_, _)
equation
print("lookupComponentRef failed for " +&
Absyn.printComponentRefStr(inCref) +& "\n");
Absyn.printComponentRefStr(inCref) +& " in " +& getEnvName(inEnv) +& "\n");
// First look up all subscripts, because all subscripts should be found
// in the enclosing scope of the component reference.
cref = lookupComponentRefSubs(inCref, inEnv);
Expand Down Expand Up @@ -1317,6 +1317,7 @@ algorithm
outElement := matchcontinue(inElement, inEnv)
local
SCode.Ident name, name2;
Absyn.Ident id;
Boolean fp, rp, pp, ep;
Option<Absyn.ConstrainClass> cc;
Option<Absyn.ArrayDim> ad;
Expand Down Expand Up @@ -1371,18 +1372,12 @@ algorithm
outPath := matchcontinue(inPath, inEnv)
local
Absyn.Path path;
Absyn.Ident id;

case (_, _)
equation
path = Absyn.pathPrefix(inPath);
true = Absyn.pathEqual(path, getEnvPath(inEnv));
then
inPath;

case (_, _)
equation
path = getEnvPath(inEnv);
path = Absyn.joinPaths(path, inPath);
id = Absyn.pathLastIdent(inPath);
path = Absyn.joinPaths(getEnvPath(inEnv), Absyn.IDENT(id));
then
path;

Expand Down

0 comments on commit 2d127f0

Please sign in to comment.