diff options
author | odersky <odersky@gmail.com> | 2015-06-22 13:09:24 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2015-06-22 13:09:24 +0200 |
commit | d2c96d02fccef3a82b88ee1ff31253b6ef17f900 (patch) | |
tree | ae953d7d2a4e610fc6725102f34b4a3dab55cd80 /tests/run | |
parent | 7c88469bdaf212cfdccce565d6ffe638dd5c1dff (diff) | |
parent | 74e9107e25a2b2f50a8d80b3b13136e5ab9eb6e9 (diff) | |
download | dotty-d2c96d02fccef3a82b88ee1ff31253b6ef17f900.tar.gz dotty-d2c96d02fccef3a82b88ee1ff31253b6ef17f900.tar.bz2 dotty-d2c96d02fccef3a82b88ee1ff31253b6ef17f900.zip |
Merge pull request #667 from dotty-staging/fix/#646-array-addition
Fix/#646 array addition
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/array-addition.check | 4 | ||||
-rw-r--r-- | tests/run/array-addition.scala | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/run/array-addition.check b/tests/run/array-addition.check new file mode 100644 index 000000000..7bfbd9c71 --- /dev/null +++ b/tests/run/array-addition.check @@ -0,0 +1,4 @@ +Array(1, 2, 3, 4) +Array(1, 2, 3, 4) +Array(1) +Array(1) diff --git a/tests/run/array-addition.scala b/tests/run/array-addition.scala new file mode 100644 index 000000000..8def48e85 --- /dev/null +++ b/tests/run/array-addition.scala @@ -0,0 +1,11 @@ +object Test { + def prettyPrintArray(x: Array[_]) = println("Array(" + x.mkString(", ") + ")") + + def main(args: Array[String]): Unit = { + prettyPrintArray(Array(1,2,3) :+ 4) + prettyPrintArray(1 +: Array(2,3,4)) + prettyPrintArray(Array() :+ 1) + prettyPrintArray(1 +: Array()) + } +} + |