summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-01-05 15:24:26 +0000
committerBurak Emir <emir@epfl.ch>2007-01-05 15:24:26 +0000
commita3d868bf57e42a3391df774a5e2cfd7123828625 (patch)
treeb763b2759b734ad9c904736d4af787c673a5f0e6 /test
parent735573067a9f827534aa6cf28d0f4e845466540a (diff)
downloadscala-a3d868bf57e42a3391df774a5e2cfd7123828625.tar.gz
scala-a3d868bf57e42a3391df774a5e2cfd7123828625.tar.bz2
scala-a3d868bf57e42a3391df774a5e2cfd7123828625.zip
removed Xkilloption from ExplicitOuter
tab->whitespace in PatternMatcher modified test case unapplySeq new test case unapplyGeneric
Diffstat (limited to 'test')
-rw-r--r--test/pending/pos/unapplyGeneric.scala11
-rw-r--r--test/pending/pos/unapplySeq.scala6
2 files changed, 13 insertions, 4 deletions
diff --git a/test/pending/pos/unapplyGeneric.scala b/test/pending/pos/unapplyGeneric.scala
new file mode 100644
index 0000000000..3798d0b466
--- /dev/null
+++ b/test/pending/pos/unapplyGeneric.scala
@@ -0,0 +1,11 @@
+object Bar {
+ def unapply[A,B](bar:Bar[A,B]) = Some(bar)
+}
+
+class Bar[A,B](val _1:A, val _2:B) extends Product2[A,B]
+
+object Test {
+ Bar(2, 'a') match {
+ case Bar(x,y) =>
+ }
+}
diff --git a/test/pending/pos/unapplySeq.scala b/test/pending/pos/unapplySeq.scala
index 36cb69cf3d..aac211de5a 100644
--- a/test/pending/pos/unapplySeq.scala
+++ b/test/pending/pos/unapplySeq.scala
@@ -1,10 +1,8 @@
-case class MyTuple2[A,B](val _1:A, val snd:B)
-
object FooSeq {
def unapplySeq(x:Any): Option[Product2[Int,Seq[String]]] = {
if(x.isInstanceOf[Bar]) {
val y = x.asInstanceOf[Bar]
- Some(MyTuple2(y.size, y.name))
+ Some({y.size, y.name})
} else None
}
@@ -23,6 +21,6 @@ object FooSeq {
class Bar {
var size: Int = 50
- var name: List[String] = List("medium","M")
+ var name: Seq[String] = List("medium","M")
}