From a3d868bf57e42a3391df774a5e2cfd7123828625 Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Fri, 5 Jan 2007 15:24:26 +0000 Subject: removed Xkilloption from ExplicitOuter tab->whitespace in PatternMatcher modified test case unapplySeq new test case unapplyGeneric --- test/pending/pos/unapplyGeneric.scala | 11 +++++++++++ test/pending/pos/unapplySeq.scala | 6 ++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 test/pending/pos/unapplyGeneric.scala (limited to 'test') 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") } -- cgit v1.2.3