summaryrefslogtreecommitdiff
path: root/test/files/run/virtpatmat_extends_product.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/virtpatmat_extends_product.scala')
-rw-r--r--test/files/run/virtpatmat_extends_product.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/virtpatmat_extends_product.scala b/test/files/run/virtpatmat_extends_product.scala
new file mode 100644
index 0000000000..e564f4430b
--- /dev/null
+++ b/test/files/run/virtpatmat_extends_product.scala
@@ -0,0 +1,11 @@
+object Test extends App {
+ case class AnnotationInfo(a: String, b: Int) extends Product2[String, Int]
+
+ // 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
+ case class NestedAnnotArg(ai: AnnotationInfo)
+
+ NestedAnnotArg(AnnotationInfo("a", 1)) match {
+ case NestedAnnotArg(x) => println(x)
+ }
+} \ No newline at end of file