We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
given
1 parent b44adf7 commit 72a0e40Copy full SHA for 72a0e40
compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
@@ -183,7 +183,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
183
"<noprefix>"
184
case tp: MethodType =>
185
changePrec(GlobalPrec) {
186
- (if (tp.isContextual) " with " else "") ~
+ (if (tp.isContextual) " given " else "") ~
187
("(" + (if (tp.isErasedMethod) "erased " else "")
188
+ (if (tp.isImplicitMethod && !tp.isContextual) "implicit " else "")
189
) ~ paramsText(tp) ~
compiler/test-resources/repl/i5855
@@ -0,0 +1,2 @@
1
+scala> def f given Int = 1
2
+def f given (x$1: Int): Int
0 commit comments