HighForm has whens so we need to check for instances there (#49)

Fixes a bug
This commit is contained in:
Colin Schmidt
2019-03-18 11:25:58 -07:00
committed by GitHub
parent 817726ff1f
commit fdad525007

View File

@@ -28,6 +28,8 @@ class RemoveUnusedModules extends Transform {
case b: Block =>
b.stmts.map{ someStatements(_) }
.foldLeft(Seq[Statement]())(_ ++ _)
case when: Conditionally =>
someStatements(when.conseq) ++ someStatements(when.alt)
case i: DefInstance => Seq(i)
case w: WDefInstance => Seq(w)
case _ => Seq()