blob: 7d290083e4b089ecf61772dc6e7d62fba3900e42 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
object Test extends dotty.runtime.LegacyApp {
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
case class NestedAnnotArg(ai: AnnotationInfo)
NestedAnnotArg(AnnotationInfo("a", 1)) match {
case NestedAnnotArg(x) => println(x)
}
}
|