Fix error on enum references to other packages, bug339.

This commit is contained in:
Wilson Snyder
2011-04-13 19:34:14 -04:00
parent c9f8109c06
commit 5d7ce096c6
6 changed files with 35 additions and 8 deletions
+6
View File
@@ -122,6 +122,12 @@ private:
nodep->packagep()->user1Inc();
}
}
virtual void visit(AstEnumItemRef* nodep, AstNUser*) {
nodep->iterateChildren(*this);
if (nodep->packagep()) {
nodep->packagep()->user1Inc();
}
}
virtual void visit(AstVarScope* nodep, AstNUser*) {
nodep->iterateChildren(*this);
m_vscsp.push_back(nodep);