File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
src/dotty/tools/dotc/printing Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
326
326
" } at " ~ preText
327
327
case mt : MethodType =>
328
328
toTextGlobal(mt)
329
+ case tp : ExprType =>
330
+ " : => " ~ toTextGlobal(tp.widenExpr)
329
331
case tp =>
330
332
" : " ~ toTextGlobal(tp)
331
333
}
Original file line number Diff line number Diff line change @@ -120,4 +120,9 @@ class ReplCompilerTests extends ReplTest {
120
120
compile(" (x: Int) => println(x)" )
121
121
assertTrue(storedOutput().startsWith(" val res0: Int => Unit =" ))
122
122
}
123
+
124
+ @ Test def byNameParam : Unit = fromInitialState { implicit state =>
125
+ compile(" def f(g: => Int): Int = g" )
126
+ assertTrue(storedOutput().startsWith(" def f(g: => Int): Int" ))
127
+ }
123
128
}
You can’t perform that action at this time.
0 commit comments