Skip to content

Commit

Permalink
Minor fixes after moving isCached to trait Info.
Browse files Browse the repository at this point in the history
  • Loading branch information
aterga committed Jul 27, 2018
1 parent a9b5c9c commit c9bc649
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/viper/server/VerificationWorker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ class ViperBackend(private val _frontend: SilFrontend) {
//Members
case t: Field => t.copy()(pos, t.info, t.errT)
case t: Function => t.copy()(pos, t.info, t.errT)
case t: Method => t.copy()(pos, t.info, t.errT, t.is_cached)
case t: Method => t.copy()(pos, t.info, t.errT)
case t: Predicate => t.copy()(pos, t.info, t.errT)
case t: Domain => t.copy()(pos, t.info, t.errT)

Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/viper/server/ViperCache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package viper.server

import ch.qos.logback.classic.Logger
import viper.silver.ast.{Forall, Hashable, Method, Node, Program}
import viper.silver.ast._
import viper.silver.utility.CacheHelper
import viper.silver.verifier.{AbstractVerificationError, errors}

Expand Down Expand Up @@ -181,7 +181,7 @@ object ViperCache {
}
}

def removeBody(m: Method): Method = m.copy(body = None)(m.pos, m.info, m.errT, is_cached = true)
def removeBody(m: Method): Method = m.copy(body = None)(m.pos, ConsInfo(m.info, Cached), m.errT)

private def str(n: Node)(implicit key: String) = s"(${n.toOneLinerStr()} -> ${getHashForNode(n).hashCode.toHexString})"
private def hex(h: String) = h.hashCode.toHexString
Expand Down

0 comments on commit c9bc649

Please sign in to comment.