diff options
Diffstat (limited to 'test/files/run/t6632.scala')
-rw-r--r-- | test/files/run/t6632.scala | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/files/run/t6632.scala b/test/files/run/t6632.scala new file mode 100644 index 0000000000..c1c8d4abe0 --- /dev/null +++ b/test/files/run/t6632.scala @@ -0,0 +1,29 @@ +object Test extends App { + import collection.mutable.ListBuffer + + def newLB = ListBuffer('a, 'b, 'c, 'd, 'e) + + val lb0 = newLB + + try { + lb0.insert(-1, 'x) + } catch { + case ex: IndexOutOfBoundsException => println(ex) + } + + val lb1 = newLB + + try { + lb1.insertAll(-2, Array('x, 'y, 'z)) + } catch { + case ex: IndexOutOfBoundsException => println(ex) + } + + val lb2 = newLB + + try { + lb2.update(-3, 'u) + } catch { + case ex: IndexOutOfBoundsException => println(ex) + } +}
\ No newline at end of file |