Skip to content

Commit

Permalink
asprogram: Track TypeName names as dependencies as well
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed Nov 12, 2013
1 parent 7ad6949 commit 4251e40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions asprogram.d
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,7 @@ private final class AStoABC : ASVisitor
return !ep;
}

/// "from" is child of "to", thus "from" must come after "to"
void registerDependency(T from, T to)
{
auto pfrom = toKey(from) in pool;
Expand Down Expand Up @@ -990,8 +991,11 @@ private final class AStoABC : ASVisitor
{
foreach (m; multinames.getPreliminaryValues())
if (m.kind == ASType.TypeName)
{
multinames.registerDependency(m, m.vTypeName.name);
foreach (t; m.vTypeName.params)
multinames.registerDependency(m, t);
}
}

this(ASProgram as)
Expand Down

0 comments on commit 4251e40

Please sign in to comment.