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 {
326326 " } at " ~ preText
327327 case mt : MethodType =>
328328 toTextGlobal(mt)
329+ case tp : ExprType =>
330+ " : => " ~ toTextGlobal(tp.widenExpr)
329331 case tp =>
330332 " : " ~ toTextGlobal(tp)
331333 }
Original file line number Diff line number Diff line change @@ -120,4 +120,9 @@ class ReplCompilerTests extends ReplTest {
120120 compile(" (x: Int) => println(x)" )
121121 assertTrue(storedOutput().startsWith(" val res0: Int => Unit =" ))
122122 }
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+ }
123128}
You can’t perform that action at this time.
0 commit comments