Repository navigation
Preserve skipped paths for boolean if conditions - #382
Open
CatarinaGamboa wants to merge 1 commit into
Open
CatarinaGamboa wants to merge 1 commit into
CatarinaGamboa wants to merge 1 commit into
Conversation
rcosta358
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An
if (again) { r.reopen(); }followingr.close()previously allowedr.use()even though the skipped branch leavesrclosed. The join used the condition's refinement relation as its guard, which made the then branch appear selected whenever that relation held.Keep expression value constraints separate from the boolean guard used for branch assumptions and state joins. Unannotated calls and calls with constraints independent of their return value retain both possible outcomes. Preserve the value constraints after the join without asserting that the condition is true.
Regression examples cover unsafe boolean variables, refined calls, unannotated calls, and calls with independent constraints; passing examples cover known true and false values, negation, repeated guards, and safe joins with and without an explicit else.
Validation:
./mvnw -pl liquidjava-verifier -am test -Dsurefire.failIfNoSpecifiedTests=falsepasses on main including #366. All five new fixtures also pass when run directly after rebasing.Fixes #371.