From 61061d0311fe1729c139ebf51844184e036bdf59 Mon Sep 17 00:00:00 2001 From: Etienne Kneuss <ekneuss@gmail.com> Date: Mon, 10 Dec 2012 18:01:30 +0100 Subject: [PATCH] Use new typecheck stuff, to be added to all trees --- src/main/scala/leon/purescala/Trees.scala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/scala/leon/purescala/Trees.scala b/src/main/scala/leon/purescala/Trees.scala index 9ae497e6c..6f5d2aff4 100644 --- a/src/main/scala/leon/purescala/Trees.scala +++ b/src/main/scala/leon/purescala/Trees.scala @@ -79,11 +79,7 @@ object Trees { case class FunctionInvocation(funDef: FunDef, args: Seq[Expr]) extends Expr with FixedType with ScalacPositional { val fixedType = funDef.returnType - funDef.args.zip(args).foreach{ case (a, c) => - if (!isSubtypeOf(c.getType, a.tpe)) { - throw new TypeErrorException("Invalid invocation of "+funDef.id+": argument "+a.id+":"+a.tpe+" was passed "+c+":"+c.getType) - } - } + funDef.args.zip(args).foreach{ case (a, c) => typeCheck(c, a.tpe) } } case class IfExpr(cond: Expr, then: Expr, elze: Expr) extends Expr -- GitLab