Skip to content
Snippets Groups Projects
Commit 179622e2 authored by Marco Antognini's avatar Marco Antognini Committed by Regis Blanc
Browse files

do not throw away function calls in block desugar

parent e4d4b51a
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ object ImperativeCodeElimination extends UnitPhase[Program] {
val (rVal, rScope, rFun) = toFunction(e)
val scope = (body: Expr) => {
rVal match {
case FunctionInvocation(tfd, args) if tfd.hasPrecondition =>
case FunctionInvocation(tfd, args) =>
rScope(replaceNames(rFun, Let(FreshIdentifier("tmp", tfd.returnType), rVal, accScope(body))))
case _ =>
rScope(replaceNames(rFun, accScope(body)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment