Skip to content

Commit dc7edc2

Browse files
committed
Add missing implicit keyword
1 parent 6781480 commit dc7edc2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/src/scala/tasty/util/ShowSourceCode.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
6666

6767
case cdef @ ClassDef(name, DefDef(_, targs, argss, _, _), parents, self, stats) =>
6868
val flags = cdef.flags
69+
if (flags.isImplicit) this += "implicit "
6970
if (flags.isFinal && !flags.isObject) this += "final "
7071
if (flags.isCase) this += "case "
7172

@@ -152,6 +153,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
152153

153154
case vdef@ValDef(name, tpt, rhs) =>
154155
val flags = vdef.flags
156+
if (flags.isImplicit) this += "implicit "
155157
if (flags.isOverride) this += "override "
156158

157159
if (flags.isLazy) this += "lazy "
@@ -203,7 +205,8 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
203205

204206
case ddef@DefDef(name, targs, argss, tpt, rhs) =>
205207
val flags = ddef.flags
206-
if (flags.isOverride) sb.append("override ")
208+
if (flags.isImplicit) this += "implicit "
209+
if (flags.isOverride) this += "override "
207210

208211
this += "def " += name
209212
printTargsDefs(targs)

0 commit comments

Comments
 (0)