Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/main/scala/viper/silver/ast/Expression.scala
Original file line number Diff line number Diff line change
Expand Up @@ -364,19 +364,18 @@ 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)
def asManifestation = this

//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)
}
}
Expand Down