diff options
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core')
| -rw-r--r-- | chiselFrontend/src/main/scala/chisel3/core/Data.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/Data.scala b/chiselFrontend/src/main/scala/chisel3/core/Data.scala index 65f89cc1..e85bee42 100644 --- a/chiselFrontend/src/main/scala/chisel3/core/Data.scala +++ b/chiselFrontend/src/main/scala/chisel3/core/Data.scala @@ -108,7 +108,7 @@ private[core] object cloneSupertype { compileOptions: CompileOptions): T = { require(!elts.isEmpty, s"can't create $createdType with no inputs") - if (elts forall {_.isInstanceOf[Bits]}) { + if (elts.head.isInstanceOf[Bits]) { val model: T = elts reduce { (elt1: T, elt2: T) => ((elt1, elt2) match { case (elt1: Bool, elt2: Bool) => elt1 case (elt1: Bool, elt2: UInt) => elt2 // TODO: what happens with zero width UInts? @@ -130,7 +130,7 @@ private[core] object cloneSupertype { } case (elt1, elt2) => throw new AssertionError( - s"can't create $createdType with heterogeneous Bits types ${elt1.getClass} and ${elt2.getClass}") + s"can't create $createdType with heterogeneous types ${elt1.getClass} and ${elt2.getClass}") }).asInstanceOf[T] } model.cloneTypeFull } |
