summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/scala/chiselTests/Vec.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/Vec.scala b/src/test/scala/chiselTests/Vec.scala
index 0884ad37..2f67f375 100644
--- a/src/test/scala/chiselTests/Vec.scala
+++ b/src/test/scala/chiselTests/Vec.scala
@@ -272,4 +272,15 @@ class VecSpec extends ChiselPropSpec {
io.out := VecInit(Seq(4.U, 5.U, DontCare, 2.U))
})
}
+
+ property("Indexing a Chisel type Vec by a hardware type should give a sane error message") {
+ assertThrows[ExpectedHardwareException] {
+ elaborate{
+ new Module {
+ val io = IO(new Bundle{})
+ val foo = Vec(2, Bool())
+ foo(0.U) := false.B
+ }}
+ }
+ }
}