Skip to content

Commit 304b5a2

Browse files
committed
Exclude unsupported trees from ReturnElimination phase
1 parent ded791f commit 304b5a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/scala/stainless/extraction/imperative/ReturnElimination.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ trait ReturnElimination
415415
}
416416
processBlockExpressions(es :+ last)
417417

418+
case (_: s.Lambda | _: s.Forall | _: s.Old | _: s.Snapshot | _: s.Choose) =>
419+
SimpleWhileTransformer.transform(expr)
420+
418421
case _ if exprHasReturn(expr) =>
419422
val (ids, vs, es, tps, flags, recons) = deconstructor.deconstruct(expr)
420423
val tvs = vs.map(SimpleWhileTransformer.transform).map(_.asInstanceOf[t.Variable])

0 commit comments

Comments
 (0)