Skip to content

Commit e31856c

Browse files
authored
Merge pull request #14716 from dotty-staging/show-pattern-ids
Show unique ids of pattern bound symbols
2 parents ab1a64e + ca63fc1 commit e31856c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,9 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
556556
case TypeBoundsTree(lo, hi, alias) =>
557557
if (lo eq hi) && alias.isEmpty then optText(lo)(" = " ~ _)
558558
else optText(lo)(" >: " ~ _) ~ optText(hi)(" <: " ~ _) ~ optText(alias)(" = " ~ _)
559-
case Bind(name, body) =>
559+
case bind @ Bind(name, body) =>
560560
keywordText("given ").provided(tree.symbol.isOneOf(GivenOrImplicit) && !homogenizedView) ~ // Used for scala.quoted.Type in quote patterns (not pickled)
561-
changePrec(InfixPrec) { toText(name) ~ " @ " ~ toText(body) }
561+
changePrec(InfixPrec) { nameIdText(bind) ~ " @ " ~ toText(body) }
562562
case Alternative(trees) =>
563563
changePrec(OrPrec) { toText(trees, " | ") }
564564
case UnApply(fun, implicits, patterns) =>

0 commit comments

Comments
 (0)