File tree 3 files changed +4
-6
lines changed 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) {
29
29
else Str (const.value.toString)
30
30
31
31
override def dclText (sym : Symbol ): Text = {
32
+ (" lazy" : Text ).provided(sym.is(Lazy )) ~~
32
33
toText(sym) ~ {
33
34
if (sym.is(Method )) toText(sym.info)
34
35
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) {
76
76
val dcl = d.symbol.showUser
77
77
78
78
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" )
84
81
}
85
82
catch { case ex : InvocationTargetException => Some (renderError(ex)) }
86
83
}
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ scala> foo
4
4
Hello
5
5
scala> { lazy val bar: Unit = { println("Hello") }; bar }
6
6
Hello
7
- val bar: Unit = <lazy>
7
+ lazy val bar: Unit
You can’t perform that action at this time.
0 commit comments