Skip to content

Commit

Permalink
do not emit permissions for final fields in pvl constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
pieter-bos committed Oct 12, 2023
1 parent cc36ff9 commit 2968aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rewrite/vct/rewrite/lang/LangPVLToCol.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ case class LangPVLToCol[Pre <: Generation](rw: LangSpecificToCol[Pre]) extends L
ApplicableContract(
UnitAccountedPredicate(tt),
UnitAccountedPredicate(AstBuildHelpers.foldStar(cls.declarations.collect {
case field: InstanceField[Pre] =>
case field: InstanceField[Pre] if field.flags.collectFirst { case _: Final[Pre] => () }.isEmpty =>
fieldPerm[Post](result, rw.succ(field), WritePerm())
}) &* (if (checkRunnable) IdleToken(result) else tt)), tt, Nil, Nil, Nil, None,
)(TrueSatisfiable)
Expand Down

0 comments on commit 2968aaf

Please sign in to comment.