summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-02-01 17:41:04 -0800
committerPaul Phillips <paulp@improving.org>2013-02-01 17:41:04 -0800
commit3dd9b3683b10edcf4f58ba1d98d4914c04614d87 (patch)
tree6be6c0f233b67595c306b37fde1cf3e08252efc8 /test/files/pos
parentccaa65a4969572631746d40d35bcd1fcfcaa51a9 (diff)
parentb403234a27518f35acc360bfa0333b00fdc85175 (diff)
downloadscala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.tar.gz
scala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.tar.bz2
scala-3dd9b3683b10edcf4f58ba1d98d4914c04614d87.zip
Merge commit 'b403234a27' into wip/fresh-merge2
Conflicts: src/compiler/scala/tools/nsc/matching/ParallelMatching.scala src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala test/files/neg/t6963.check
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t6963c.flags1
-rw-r--r--test/files/pos/t6963c.scala25
2 files changed, 26 insertions, 0 deletions
diff --git a/test/files/pos/t6963c.flags b/test/files/pos/t6963c.flags
new file mode 100644
index 0000000000..4d6e04914f
--- /dev/null
+++ b/test/files/pos/t6963c.flags
@@ -0,0 +1 @@
+-Xmigration:2.9 -Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t6963c.scala b/test/files/pos/t6963c.scala
new file mode 100644
index 0000000000..0b6b5c757f
--- /dev/null
+++ b/test/files/pos/t6963c.scala
@@ -0,0 +1,25 @@
+object Test {
+ def f1(x: Any) = x.isInstanceOf[Seq[_]]
+ def f2(x: Any) = x match {
+ case _: Seq[_] => true
+ case _ => false
+ }
+
+ def f3(x: Any) = x match {
+ case _: Array[_] => true
+ case _ => false
+ }
+
+ def f4(x: Any) = x.isInstanceOf[Traversable[_]]
+
+ def f5(x1: Any, x2: Any, x3: AnyRef) = (x1, x2, x3) match {
+ case (Some(_: Seq[_]), Nil, _) => 1
+ case (None, List(_: List[_], _), _) => 2
+ case _ => 3
+ }
+
+ def f5: Unit = {
+ import scala.collection.mutable._
+ List(1,2,3,4,5).scanRight(0)(_+_)
+ }
+}