Skip to content
Snippets Groups Projects
Commit b2c422f5 authored by Regis Blanc's avatar Regis Blanc
Browse files

while loops with distinguishable names

parent c9e103e4
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ object ImperativeCodeElimination extends UnitPhase[Program] {
(resId.toVariable, scope, scrutFun ++ modifiedVars.zip(freshIds).toMap)
case wh@While(cond, body) =>
val whileFunDef = new FunDef(parent.id.freshen, Nil, Nil, UnitType).setPos(wh)
val whileFunDef = new FunDef(parent.id.duplicate(name = (parent.id.name + "While")), Nil, Nil, UnitType).setPos(wh)
whileFunDef.addFlag(IsLoop(parent))
whileFunDef.body = Some(
IfExpr(cond,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment