File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
library/src/scala/tasty/reflect Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -976,6 +976,8 @@ trait Printers
976
976
def flatBlock (stats : List [Statement ], expr : Term ): (List [Statement ], Term ) = {
977
977
val flatStats = List .newBuilder[Statement ]
978
978
def extractFlatStats (stat : Statement ): Unit = stat match {
979
+ case Lambda (_, _) => // must come before `Block`
980
+ flatStats += stat
979
981
case Block (stats1, expr1) =>
980
982
val it = stats1.iterator
981
983
while (it.hasNext)
@@ -990,6 +992,8 @@ trait Printers
990
992
case stat => flatStats += stat
991
993
}
992
994
def extractFlatExpr (term : Term ): Term = term match {
995
+ case Lambda (_, _) => // must come before `Block`
996
+ term
993
997
case Block (stats1, expr1) =>
994
998
val it = stats1.iterator
995
999
while (it.hasNext)
You can’t perform that action at this time.
0 commit comments