diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-01 09:54:14 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-02-01 09:54:14 -0800 |
commit | b403234a27518f35acc360bfa0333b00fdc85175 (patch) | |
tree | 664e511a5d2dea694a1e538eb5ef682b3d03ae32 /test/files/pos | |
parent | adf51eef7698ba389392f934ddd8668cc33b15dc (diff) | |
parent | 1de399d3c655807465c6369f77d08e57743e7eaa (diff) | |
download | scala-b403234a27518f35acc360bfa0333b00fdc85175.tar.gz scala-b403234a27518f35acc360bfa0333b00fdc85175.tar.bz2 scala-b403234a27518f35acc360bfa0333b00fdc85175.zip |
Merge pull request #1998 from JamesIry/2.10.x_6963_2
SI-6963 Add version to -Xmigration
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t6963c.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t6963c.scala | 25 |
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)(_+_) + } +} |