aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t6963c.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t6963c.scala')
-rw-r--r--tests/untried/pos/t6963c.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/untried/pos/t6963c.scala b/tests/untried/pos/t6963c.scala
new file mode 100644
index 000000000..d3c3616eb
--- /dev/null
+++ b/tests/untried/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)(_+_)
+ }
+}