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.
1 parent fcbb4f7 commit 2697436Copy full SHA for 2697436
repl/src/dotty/tools/repl/render.scala
@@ -45,12 +45,20 @@ object Rendering {
45
}
46
47
def renderVal(d: Denotation, classLoader: ClassLoader)(implicit ctx: Context): String = {
48
- val prefix = if (d.symbol.is(Flags.Mutable)) "var" else "val"
+ val prefix =
49
+ if (d.symbol.is(Flags.Mutable)) "var"
50
+ else if (d.symbol.is(Flags.Lazy)) "lazy val"
51
+ else "val"
52
+
53
val tpe = d.info match {
54
case ConstantType(c) => c.value.toString
55
case tpe => tpe.show
56
- val res = valueOf(d.symbol, classLoader)
57
58
+ val res =
59
+ if (d.symbol.is(Flags.Lazy)) "<lazy>"
60
+ else valueOf(d.symbol, classLoader)
61
62
s"$prefix ${d.symbol.name.show}: $tpe = $res"
63
64
0 commit comments