Skip to content

Commit

Permalink
Make sure bip constructor is only generated for the non-statics class
Browse files Browse the repository at this point in the history
  • Loading branch information
bobismijnnaam committed Oct 11, 2023
1 parent ab40e3a commit b7f4212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rewrite/vct/rewrite/lang/LangJavaToCol.scala
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ case class LangJavaToCol[Pre <: Generation](rw: LangSpecificToCol[Pre]) extends
val res = Local[Post](resVar.ref)

val results = currentJavaClass.top.modifiers.collect {
case annotation@JavaAnnotationEx(_, _, component@JavaAnnotationData.BipComponent(_, _)) =>
case annotation@JavaAnnotationEx(_, _, component@JavaAnnotationData.BipComponent(_, _)) if !isStaticPart =>
rw.bip.rewriteConstructor(cons, annotation, component, diz => Block[Post](Seq(fieldInit(diz), sharedInit(diz))))
}
if (results.isEmpty) { // We didn't execute the bip rewrite, so we do the normal one
Expand Down

0 comments on commit b7f4212

Please sign in to comment.