Skip to content

Commit 03dca96

Browse files
committed
Fix printing return
1 parent 1f523ea commit 03dca96

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class ShowSourceCode[T <: Tasty with Singleton](tasty0: T) extends Show[T](tasty
389389
}
390390

391391
case Term.Return(expr) =>
392-
this += "}"
392+
this += "return "
393393
printTree(expr)
394394

395395
case Term.Repeated(elems) =>

tests/pos/t3869.decompiled

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/** Decompiled from out/posTestFromTasty/pos/t3869/Test.class */
2+
object Test {
3+
def f: scala.Unit = try return () finally while (true) ()
4+
def main(args: scala.Array[scala.Predef.String]): scala.Unit = {
5+
Test.f
6+
}
7+
}

0 commit comments

Comments
 (0)