diff options
Diffstat (limited to 'test/files/run/virtpatmat_extends_product.scala')
-rw-r--r-- | test/files/run/virtpatmat_extends_product.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/files/run/virtpatmat_extends_product.scala b/test/files/run/virtpatmat_extends_product.scala index e564f4430b..4b4bc634a7 100644 --- a/test/files/run/virtpatmat_extends_product.scala +++ b/test/files/run/virtpatmat_extends_product.scala @@ -1,5 +1,8 @@ object Test extends App { - case class AnnotationInfo(a: String, b: Int) extends Product2[String, Int] + case class AnnotationInfo(a: String, b: Int) extends Product2[String, Int] { + def _1 = a + def _2 = b + } // if we're not careful in unapplyTypeListFromReturnType, the generated unapply is // thought to return two components instead of one, since AnnotationInfo (the result of the unapply) is a Product2 @@ -8,4 +11,4 @@ object Test extends App { NestedAnnotArg(AnnotationInfo("a", 1)) match { case NestedAnnotArg(x) => println(x) } -}
\ No newline at end of file +} |