diff options
author | James Iry <jamesiry@gmail.com> | 2013-01-28 08:55:34 -0800 |
---|---|---|
committer | James Iry <jamesiry@gmail.com> | 2013-01-29 13:14:17 -0800 |
commit | 1de399d3c655807465c6369f77d08e57743e7eaa (patch) | |
tree | e967c0bf49de2ee368a137cf91308de623bc9d13 /test/files/neg/t6963b.scala | |
parent | d4de6f4cc6c3f0f9d7810c6e9a10147a0406e3f5 (diff) | |
download | scala-1de399d3c655807465c6369f77d08e57743e7eaa.tar.gz scala-1de399d3c655807465c6369f77d08e57743e7eaa.tar.bz2 scala-1de399d3c655807465c6369f77d08e57743e7eaa.zip |
SI-6963 Add version to -Xmigration
Adds an optional version parameter to the -Xmigration compiler setting.
Doing -Xmigration without version number behaves as it used to by
dumping every possible migration warning.
This commit adds a ScalaVersion class (plus ancillary stuff), and a
ScalaVersionSetting.
Diffstat (limited to 'test/files/neg/t6963b.scala')
-rw-r--r-- | test/files/neg/t6963b.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/t6963b.scala b/test/files/neg/t6963b.scala new file mode 100644 index 0000000000..3cfa8f0dca --- /dev/null +++ b/test/files/neg/t6963b.scala @@ -0,0 +1,20 @@ +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 + } +} |