diff --git a/src/main/scala/firrtl/passes/ResolveKinds.scala b/src/main/scala/firrtl/passes/ResolveKinds.scala index a01bb5ad31..c7d0cdce5e 100644 --- a/src/main/scala/firrtl/passes/ResolveKinds.scala +++ b/src/main/scala/firrtl/passes/ResolveKinds.scala @@ -5,10 +5,13 @@ package firrtl.passes import firrtl._ import firrtl.ir._ import firrtl.Mappers._ +import firrtl.traversals.Foreachers._ +import firrtl.options.PreservesAll object ResolveKinds extends Pass { - private def find_port(kinds: collection.mutable.HashMap[String, Kind])(p: Port): Port = { - kinds(p.name) = PortKind ; p + + private def find_port(kinds: collection.mutable.HashMap[String, Kind])(p: Port): Unit = { + kinds(p.name) = PortKind } def resolve_expr(kinds: collection.mutable.HashMap[String, Kind])(e: Expression): Expression = e match { @@ -31,7 +34,7 @@ object ResolveKinds extends Pass { def resolve_kinds(m: DefModule): DefModule = { val kinds = new collection.mutable.HashMap[String, Kind] - m.map(find_port(kinds)) + m.foreach(find_port(kinds)) m.map(resolve_stmt(kinds)) }