File tree 1 file changed +11
-4
lines changed
library/src/scala/tasty/reflect 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1310,10 +1310,17 @@ trait Printers
1310
1310
printPattern(pattern)
1311
1311
1312
1312
case Pattern .Unapply (fun, implicits, patterns) =>
1313
- fun match {
1314
- case Select (extractor, " unapply" | " unapplySeq" ) => printTree(extractor)
1315
- case TypeApply (Select (extractor, " unapply" | " unapplySeq" ), _) => printTree(extractor)
1316
- case _ => throw new MatchError (fun.show)
1313
+ val fun2 = fun match {
1314
+ case TypeApply (fun2, _) => fun2
1315
+ case _ => fun
1316
+ }
1317
+ fun2 match {
1318
+ case Select (extractor, " unapply" | " unapplySeq" ) =>
1319
+ printTree(extractor)
1320
+ case Ident (" unapply" | " unapplySeq" ) =>
1321
+ this += fun.symbol.owner.fullName.stripSuffix(" $" )
1322
+ case _ =>
1323
+ throw new MatchError (fun.show)
1317
1324
}
1318
1325
inParens(printPatterns(patterns, " , " ))
1319
1326
You can’t perform that action at this time.
0 commit comments