Skip to content

Commit 4f98732

Browse files
committed
Add representation test
1 parent c647577 commit 4f98732

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/run/iarrays.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ object Test extends App {
6565
assert(as(as.length - 1) == "hello")
6666
assert(reduce(as, 0, (x, y) => x.toString ++ y.toString) == "01hello")
6767

68+
// Check that representation of IArray and Array is the same
69+
val bs: IArray[Double] = IArray(1.0, 2.0)
70+
val cs: Array[Double] = bs.asInstanceOf[Array[Double]]
71+
cs(1) = 3.0
72+
assert(bs(1) == 3.0)
6873
}

0 commit comments

Comments
 (0)