From b845f187e8f2742e99e1f64c940b8fa573a39756 Mon Sep 17 00:00:00 2001 From: Christoph Matheja Date: Tue, 5 Jan 2021 13:41:02 +0100 Subject: [PATCH] changed the constructor of DomainFuncApp to match the constructor of FuncApp --- src/main/scala/viper/silver/ast/Expression.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/scala/viper/silver/ast/Expression.scala b/src/main/scala/viper/silver/ast/Expression.scala index fe12f768b..f4a56e4ce 100644 --- a/src/main/scala/viper/silver/ast/Expression.scala +++ b/src/main/scala/viper/silver/ast/Expression.scala @@ -364,11 +364,10 @@ object FuncApp { /** User-defined domain function application. */ case class DomainFuncApp(funcname: String, args: Seq[Exp], typVarMap: Map[TypeVar, Type]) - (val pos: Position, val info: Info, typPassed: => Type, val domainName:String, val errT: ErrorTrafo) + (val pos: Position, val info: Info, override val typ: Type, val domainName:String, val errT: ErrorTrafo) extends AbstractDomainFuncApp with PossibleTrigger { override lazy val check : Seq[ConsistencyError] = args.flatMap(Consistency.checkPure) - def typ = typPassed def func = (p:Program) => p.findDomainFunction(funcname) def getArgs = args def withArgs(newArgs: Seq[Exp]) = DomainFuncApp(funcname,newArgs,typVarMap)(pos,info,typ,domainName, errT) @@ -376,7 +375,7 @@ case class DomainFuncApp(funcname: String, args: Seq[Exp], typVarMap: Map[TypeVa //Strangely, the copy method is not a member of the DomainFuncApp case class, //therefore, We need this method that does the copying manually - def copy(funcname: String = this.funcname, args: Seq[Exp] = this.args, typVarMap: Map[TypeVar, Type] = this.typVarMap): (Position, Info, => Type, String, ErrorTrafo) => DomainFuncApp ={ + def copy(funcname: String = this.funcname, args: Seq[Exp] = this.args, typVarMap: Map[TypeVar, Type] = this.typVarMap): (Position, Info, Type, String, ErrorTrafo) => DomainFuncApp ={ DomainFuncApp(this.funcname,args,typVarMap) } }