Skip to content

Commit 20edebe

Browse files
committed
Add Show[ParamInfo]
Requires pushing Show[Showable] down a notch
1 parent c87bd05 commit 20edebe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler/src/dotty/tools/dotc/printing/Formatting.scala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,16 @@ object Formatting {
3333
object ShowAny extends Show[Any]:
3434
def show(x: Any): Shown = x
3535

36-
class ShowImplicits2:
36+
class ShowImplicits3:
3737
given Show[Product] = ShowAny
3838

39+
class ShowImplicits2 extends ShowImplicits3:
40+
given Show[ParamInfo] with
41+
def show(x: ParamInfo) = x match
42+
case x: Symbol => Show[x.type].show(x)
43+
case x: LambdaParam => Show[x.type].show(x)
44+
case _ => ShowAny
45+
3946
class ShowImplicits1 extends ShowImplicits2:
4047
given Show[ImplicitRef] = ShowAny
4148
given Show[Names.Designator] = ShowAny

0 commit comments

Comments
 (0)