File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
library/src/scala/tasty/reflect Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1310,10 +1310,17 @@ trait Printers
13101310 printPattern(pattern)
13111311
13121312 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)
13171324 }
13181325 inParens(printPatterns(patterns, " , " ))
13191326
You can’t perform that action at this time.
0 commit comments