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
976976 def flatBlock (stats : List [Statement ], expr : Term ): (List [Statement ], Term ) = {
977977 val flatStats = List .newBuilder[Statement ]
978978 def extractFlatStats (stat : Statement ): Unit = stat match {
979+ case Lambda (_, _) => // must come before `Block`
980+ flatStats += stat
979981 case Block (stats1, expr1) =>
980982 val it = stats1.iterator
981983 while (it.hasNext)
@@ -990,6 +992,8 @@ trait Printers
990992 case stat => flatStats += stat
991993 }
992994 def extractFlatExpr (term : Term ): Term = term match {
995+ case Lambda (_, _) => // must come before `Block`
996+ term
993997 case Block (stats1, expr1) =>
994998 val it = stats1.iterator
995999 while (it.hasNext)
You can’t perform that action at this time.
0 commit comments