diff --git a/src/main/scala/Vec.scala b/src/main/scala/Vec.scala index 5e1147d7..ddeb10b0 100644 --- a/src/main/scala/Vec.scala +++ b/src/main/scala/Vec.scala @@ -210,7 +210,7 @@ class Vec[T <: Data](val gen: (Int) => T, elts: Iterable[T]) extends Aggregate w } } - override def cloneType: this.type = Vec.tabulate(size)(gen).asInstanceOf[this.type] //Vec(this: Seq[T]).asInstanceOf[this.type] + override def cloneType: this.type = Vec(elts.map(_.cloneType)).asInstanceOf[this.type] override def asDirectionless: this.type = { self.foreach(_.asDirectionless) ; this } override def asOutput: this.type = { self.foreach(_.asOutput) ; this } override def asInput: this.type = { self.foreach(_.asInput) ; this }