diff options
author | Martin Odersky <odersky@gmail.com> | 2015-03-08 22:02:22 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:16:37 +0100 |
commit | 5962a931c83622ce065bc1ce9add049ade89bfcf (patch) | |
tree | 24851bbc76f1ca537456715c44a9f866a5c00668 /tests/pickling/arrays2.scala | |
parent | 19bfc0c6c9be9c4c3fdca55480e01e980a493b42 (diff) | |
download | dotty-5962a931c83622ce065bc1ce9add049ade89bfcf.tar.gz dotty-5962a931c83622ce065bc1ce9add049ade89bfcf.tar.bz2 dotty-5962a931c83622ce065bc1ce9add049ade89bfcf.zip |
Pickling test reorg
Move pickling tests into separate top-level test directory.
That way they are not needlessly pos-tested before.
Also, disable core tests for now - after rebasing we get a stale symbol error.
Need to investigate that.
Diffstat (limited to 'tests/pickling/arrays2.scala')
-rw-r--r-- | tests/pickling/arrays2.scala | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/pickling/arrays2.scala b/tests/pickling/arrays2.scala new file mode 100644 index 000000000..1a0d3e660 --- /dev/null +++ b/tests/pickling/arrays2.scala @@ -0,0 +1,32 @@ +package arrays + +case class C(); + +object arrays2 { + + def main(args: Array[String]): Unit = { + val a: Array[Array[C]] = new Array[Array[C]](2); + a(0) = new Array[C](2); + a(0)(0) = new C(); + } +} + +// #2422 +object arrays4 { + val args = Array[String]("World") + "Hello %1$s".format(args: _*) +} + +// #2461 +object arrays3 { + import scala.collection.JavaConversions._ + def apply[X](xs : X*) : java.util.List[X] = java.util.Arrays.asList(xs: _*) + + def apply1[X <: String](xs : X*) : java.util.List[X] = java.util.Arrays.asList(xs: _*) + def apply2[X <: AnyVal](xs : X*) : java.util.List[X] = java.util.Arrays.asList(xs: _*) + def apply3(xs : Int*) : java.util.List[Int] = java.util.Arrays.asList(xs: _*) + def apply4(xs : Unit*) : java.util.List[Unit] = java.util.Arrays.asList(xs: _*) + def apply5(xs : Null*) : java.util.List[Null] = java.util.Arrays.asList(xs: _*) + def apply6(xs : Nothing*) : java.util.List[Nothing] = java.util.Arrays.asList(xs: _*) +} + |