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

fix with typed fun invocation

parent f956f924
Branches
Tags
No related merge requests found
......@@ -164,7 +164,7 @@ object AntiAliasingPhase extends TransformationPhase {
updatedFunDefs.get(fd.fd) match {
case None => (None, bindings)
case Some(nfd) => {
val nfi = FunctionInvocation(nfd.typed, args).setPos(fi)
val nfi = FunctionInvocation(nfd.typed(fd.tps), args).setPos(fi)
val fiEffects = effects.getOrElse(fd.fd, Set())
if(fiEffects.nonEmpty) {
val modifiedArgs: Seq[Variable] =
......@@ -267,7 +267,9 @@ object AntiAliasingPhase extends TransformationPhase {
if(!effects.isDefinedAt(fi.tfd.fd)) {
println("fi not defined: " + fi)
}
val mutatedParams: Set[Int] = effects(fi.tfd.fd)
//TODO: the require should be fine once we consider nested functions as well
//require(effects.isDefinedAt(fi.tfd.fd)
val mutatedParams: Set[Int] = effects.get(fi.tfd.fd).getOrElse(Set())
fi.args.zipWithIndex.flatMap{
case (Variable(id), i) if mutatedParams.contains(i) => Some(id)
case _ => None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment