Skip to content
Snippets Groups Projects
Commit 0f5b383d authored by Manos Koukoutos's avatar Manos Koukoutos
Browse files

Don't produce the same call twice

parent bb58a794
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ case object IntroduceRecCalls extends NormalizingRule("Introduce rec. calls") {
val existingCalls = pcs.collect { case Equals(_, fi: FunctionInvocation) => fi }.toSet
val calls = terminatingCalls(hctx.program, p.ws, p.pc, None, false)
.map(_._1).filterNot(existingCalls)
.map(_._1).distinct.filterNot(existingCalls)
if (calls.isEmpty) return Nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment