Skip to content

Commit d7c67bd

Browse files
committed
Adapt printing of context parameters and arguments to new syntax
1 parent fc76dc8 commit d7c67bd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
389389
keywordStr("${") ~ toTextGlobal(args, ", ") ~ keywordStr("}")
390390
else
391391
toTextLocal(fun)
392+
~ ("." ~ keywordText("with")).provided(app.isGivenApply && !homogenizedView)
392393
~ "("
393-
~ keywordText("given ").provided(app.isGivenApply && !homogenizedView)
394394
~ toTextGlobal(args, ", ")
395395
~ ")"
396396
case tree: TypeApply =>
@@ -772,10 +772,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
772772
}
773773

774774
private def paramsText[T>: Untyped](params: List[ValDef[T]]) =
775-
"("
776-
~ keywordText("given ").provided(params.nonEmpty && params.head.mods.is(Given))
777-
~ toText(params, ", ")
778-
~ ")"
775+
keywordText(" with ").provided(params.nonEmpty && params.head.mods.is(Given))
776+
~ "(" ~ toText(params, ", ") ~ ")"
779777

780778
protected def defDefToText[T >: Untyped](tree: DefDef[T]): Text = {
781779
import untpd.{modsDeco => _}

0 commit comments

Comments
 (0)