diff options
author | Paul Phillips <paulp@improving.org> | 2013-02-01 17:41:04 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-02-01 17:41:04 -0800 |
commit | 3dd9b3683b10edcf4f58ba1d98d4914c04614d87 (patch) | |
tree | 6be6c0f233b67595c306b37fde1cf3e08252efc8 /test/files/pos | |
parent | ccaa65a4969572631746d40d35bcd1fcfcaa51a9 (diff) | |
parent | b403234a27518f35acc360bfa0333b00fdc85175 (diff) | |
download | scala-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.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)(_+_) + } +} |