File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class ReplPrinter(_ctx: Context) extends DecompilerPrinter(_ctx) {
2929 else Str (const.value.toString)
3030
3131 override def dclText (sym : Symbol ): Text = {
32+ (" lazy" : Text ).provided(sym.is(Lazy )) ~~
3233 toText(sym) ~ {
3334 if (sym.is(Method )) toText(sym.info)
3435 else if (sym.isType && sym.info.isTypeAlias) toText(sym.info)
Original file line number Diff line number Diff line change @@ -76,11 +76,8 @@ private[repl] class Rendering(parentClassLoader: Option[ClassLoader] = None) {
7676 val dcl = d.symbol.showUser
7777
7878 try {
79- val resultValue =
80- if (d.symbol.is(Flags .Lazy )) Some (" <lazy>" )
81- else valueOf(d.symbol)
82-
83- resultValue.map(value => s " $dcl = $value" )
79+ if (d.symbol.is(Flags .Lazy )) Some (dcl)
80+ else valueOf(d.symbol).map(value => s " $dcl = $value" )
8481 }
8582 catch { case ex : InvocationTargetException => Some (renderError(ex)) }
8683 }
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ scala> foo
44Hello
55scala> { lazy val bar: Unit = { println("Hello") }; bar }
66Hello
7- val bar: Unit = <lazy>
7+ lazy val bar: Unit
You can’t perform that action at this time.
0 commit comments