Skip to content

Commit 0861a29

Browse files
committed
Remove vestiges of with in printing and patching code
1 parent 041b2bb commit 0861a29

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
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)
393392
~ "("
393+
~ Str("using ").provided(app.isGivenApply && !homogenizedView)
394394
~ toTextGlobal(args, ", ")
395395
~ ")"
396396
case tree: TypeApply =>

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,9 +2663,9 @@ class Typer extends Namer
26632663
// coming from context bounds. Issue a warning instead and offer a patch.
26642664
ctx.migrationWarning(
26652665
em"""Context bounds will map to context parameters.
2666-
|A `with` clause is needed to pass explicit arguments to them.
2666+
|A `using` clause is needed to pass explicit arguments to them.
26672667
|This code can be rewritten automatically using -rewrite""", tree.sourcePos)
2668-
patch(Span(tree.span.end), ".with")
2668+
patch(Span(pt.args.head.span.start), "using ")
26692669
tree
26702670
else
26712671
adaptNoArgs(wtp) // insert arguments implicitly

0 commit comments

Comments
 (0)