Skip to content

Commit c48400e

Browse files
committed
Fix #6518: Add missing case for While
1 parent 0e66a88 commit c48400e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

library/src/scala/tasty/reflect/TreeUtils.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ trait TreeUtils
4646
foldTree(foldTrees(x, stats), expr)
4747
case If(cond, thenp, elsep) =>
4848
foldTree(foldTree(foldTree(x, cond), thenp), elsep)
49+
case While(cond, body) =>
50+
foldTree(foldTree(x, cond), body)
4951
case Lambda(meth, tpt) =>
5052
val a = foldTree(x, meth)
5153
tpt.fold(a)(b => foldTree(a, b))

tests/run-macros/tasty-extractors-3/quoted_2.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ object Test {
1010
def f2[T >: Int <: Int](): T = ???
1111
class Foo { type X }
1212
val foo = new Foo { type X = String }
13+
while (true) println()
1314
}
1415
}
1516
}

0 commit comments

Comments
 (0)