diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-19 20:41:46 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-19 20:41:46 -0800 |
commit | 107e87f81be45aedccb6a943ffea86591c49fba7 (patch) | |
tree | 0934b96ad57286ed24e426016417771cf9c3bd88 /test/files/run | |
parent | 832e3179cb2d0e3dbf1ff63234ec0cbc36a2b2fe (diff) | |
parent | ab07db12cc09fd34cfab5abca9dd0f01df5f77a5 (diff) | |
download | scala-107e87f81be45aedccb6a943ffea86591c49fba7.tar.gz scala-107e87f81be45aedccb6a943ffea86591c49fba7.tar.bz2 scala-107e87f81be45aedccb6a943ffea86591c49fba7.zip |
Merge remote-tracking branches 'axel22/issue/5293' and 'jsuereth/fix-5053-view-unzip' into develop
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t4024.scala | 11 | ||||
-rw-r--r-- | test/files/run/t5053.check | 6 | ||||
-rw-r--r-- | test/files/run/t5053.scala | 20 |
3 files changed, 37 insertions, 0 deletions
diff --git a/test/files/run/t4024.scala b/test/files/run/t4024.scala index ef768beb99..7c62a3fc6e 100644 --- a/test/files/run/t4024.scala +++ b/test/files/run/t4024.scala @@ -5,5 +5,16 @@ object Test extends App { val m = x.getClass.getMethod("toString") assert(m.invoke(x, (Nil: List[AnyRef]): _*) == "abc") + + Test2.main(Array()) } + +object Test2 { + def main(args: Array[String]): Unit = { + val x = "abc" + val m = x.getClass.getMethod("toString") + m.invoke(x, Nil: _*) + m.invoke(x, Seq(): _*) + } +} diff --git a/test/files/run/t5053.check b/test/files/run/t5053.check new file mode 100644 index 0000000000..5ec39bbdeb --- /dev/null +++ b/test/files/run/t5053.check @@ -0,0 +1,6 @@ +true +true +true +true +true +true diff --git a/test/files/run/t5053.scala b/test/files/run/t5053.scala new file mode 100644 index 0000000000..e46dad5ac6 --- /dev/null +++ b/test/files/run/t5053.scala @@ -0,0 +1,20 @@ +object Test extends App { + { + val (left, right) = Seq((1, "a"), (1, "a"), (1, "a"), (3, "c")).view.unzip + println(left.isInstanceOf[scala.collection.SeqViewLike[_,_,_]]) + val (l, m, r) = Seq((1, 1.0, "a"), (1, 1.0, "a"), (1, 1.0, "a"), (3, 3.0, "c")).view.unzip3 + println(l.isInstanceOf[scala.collection.SeqViewLike[_,_,_]]) + } + { + val (left, right) = Iterable((1, "a"), (1, "a"), (1, "a"), (3, "c")).view.unzip + println(left.isInstanceOf[scala.collection.IterableViewLike[_,_,_]]) + val (l, m, r) = Iterable((1, 1.0, "a"), (1, 1.0, "a"), (1, 1.0, "a"), (3, 3.0, "c")).view.unzip3 + println(l.isInstanceOf[scala.collection.IterableViewLike[_,_,_]]) + } + { + val (left, right) = Traversable((1, "a"), (1, "a"), (1, "a"), (3, "c")).view.unzip + println(left.isInstanceOf[scala.collection.TraversableViewLike[_,_,_]]) + val (l, m, r) = Traversable((1, 1.0, "a"), (1, 1.0, "a"), (1, 1.0, "a"), (3, 3.0, "c")).view.unzip3 + println(l.isInstanceOf[scala.collection.TraversableViewLike[_,_,_]]) + } +} |