diff --git a/src/rewrite/vct/rewrite/lang/LangBipToCol.scala b/src/rewrite/vct/rewrite/lang/LangBipToCol.scala index ac71ae268d..6cd3a2c7fd 100644 --- a/src/rewrite/vct/rewrite/lang/LangBipToCol.scala +++ b/src/rewrite/vct/rewrite/lang/LangBipToCol.scala @@ -176,7 +176,8 @@ case class LangBipToCol[Pre <: Generation](rw: LangSpecificToCol[Pre]) extends L def rewriteConstructor(constructor: JavaConstructor[Pre], annotation: JavaAnnotation[Pre], data: jad.BipComponent[Pre]): Unit = { implicit val o: Origin = constructor.o - val contractWithoutRequires = constructor.contract.copy(requires = UnitAccountedPredicate(tt))() + val contractWithoutRequires = constructor.contract.copy(requires = UnitAccountedPredicate[Pre](tt))( + blame = constructor.contract.blame)(o = constructor.o) if (contractWithoutRequires.nonEmpty) { throw ImproperConstructor(constructor, "Only precondition is allowed on JavaBIP component constructors") } diff --git a/src/rewrite/vct/rewrite/lang/LangJavaToCol.scala b/src/rewrite/vct/rewrite/lang/LangJavaToCol.scala index 88e80f2689..d12cfa2570 100644 --- a/src/rewrite/vct/rewrite/lang/LangJavaToCol.scala +++ b/src/rewrite/vct/rewrite/lang/LangJavaToCol.scala @@ -4,7 +4,7 @@ import com.typesafe.scalalogging.LazyLogging import hre.util.{FuncTools, ScopedStack} import vct.col.ast._ import vct.col.rewrite.lang.LangSpecificToCol.{NotAValue, ThisVar} -import vct.col.origin.{AbstractApplicable, Blame, CallableFailure, ContextEverywhereFailedInPost, ContractedFailure, DerefPerm, ExceptionNotInSignals, JavaArrayInitializerBlame, JavaConstructorPostconditionFailed, Origin, PanicBlame, PostBlameSplit, SignalsFailed, SourceNameOrigin, TerminationMeasureFailed, TrueSatisfiable} +import vct.col.origin.{AbstractApplicable, Blame, CallableFailure, ContextEverywhereFailedInPost, ContractedFailure, DerefPerm, ExceptionNotInSignals, JavaArrayInitializerBlame, JavaConstructorPostconditionFailed, Origin, PanicBlame, PostBlameSplit, PostconditionFailed, SignalsFailed, SourceNameOrigin, TerminationMeasureFailed, TrueSatisfiable} import vct.col.ref.{LazyRef, Ref} import vct.col.resolve.ctx._ import vct.col.rewrite.{Generation, Rewritten} @@ -268,7 +268,7 @@ case class LangJavaToCol[Pre <: Generation](rw: LangSpecificToCol[Pre]) extends case method: JavaMethod[Pre] => // For each javabip annotation that we encounter, execute a rewrite val results = method.modifiers.collect { - case annotation @ JavaAnnotationEx(_, _, guard @ JavaAnnotationData.BipGuard(_)) => + case annotation @ JavaAnnotationEx(_, _, guard: JavaAnnotationData.BipGuard[Pre]) => rw.bip.rewriteGuard(method, annotation, guard) case annotation @ JavaAnnotationEx(_, _, transition : JavaAnnotationData.BipTransition[Pre]) => rw.bip.rewriteTransition(method, annotation, transition)