blob: e564f4430be2f53ace973845d779e4a3cdf18927 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
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)
}
}
|