Skip to content

Commit 183266d

Browse files
committed
wip
1 parent eb62a9f commit 183266d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
1818

1919
private class Buffer(implicit ctx: Context) {
2020

21-
private val sb: StringBuilder = new StringBuilder
21+
private[this] val sb: StringBuilder = new StringBuilder
2222

2323
private[this] var indent: Int = 0
2424
def indented(printIndented: => Unit): Unit = {
@@ -32,7 +32,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
3232
def lineBreak: String = "\n" + (" " * indent)
3333

3434
def printTree(tree: Tree): Buffer = tree match {
35-
case tree@PackageClause(Term.Ident(name), stats) =>
35+
case tree @ PackageClause(Term.Ident(name), stats) =>
3636
val stats1 = stats.collect {
3737
case stat@Definition() if !(stat.flags.isObject && stat.flags.isLazy) => stat
3838
case stat@Import(_, _) => stat
@@ -644,7 +644,8 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
644644
printType(right)
645645

646646
case Type.ByNameType(tp) =>
647-
???
647+
this += " => "
648+
printType(tp)
648649

649650
case Type.ParamRef(binder, idx) =>
650651
???

0 commit comments

Comments
 (0)