Skip to content
Snippets Groups Projects
Commit 27600072 authored by Etienne Kneuss's avatar Etienne Kneuss Committed by Philippe Suter
Browse files

Build Expr from tuples

parent 61061d03
Branches
Tags
No related merge requests found
......@@ -20,4 +20,8 @@ public final class Tuple {
}
return this.elements[index];
}
public final int getArity() {
return this.arity;
}
}
......@@ -53,6 +53,14 @@ class CompilationUnit(val program: Program, val classes: Map[Definition, ClassFi
case _ =>
throw CompilationException("Unsupported return value : " + e)
}
case tpl: runtime.Tuple =>
val elems = for (i <- 0 until tpl.getArity) yield {
javaToGroundExpr(tpl.get(i))
}
Tuple(elems)
case _ =>
throw CompilationException("MEH Unsupported return value : " + e.getClass)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment