Skip to content

Propagate qualifier bounds in the correct direction - #7983

Merged
smillst merged 3 commits into
typetools:masterfrom
mernst:type-inference-review2-fix-3
Aug 17, 2026
Merged

smillst merged 3 commits into
typetools:masterfrom
mernst:type-inference-review2-fix-3

Conversation

@mernst

@mernst mernst commented Aug 14, 2026

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 07164fa6-2f64-401c-9143-15b4498f57ea

📥 Commits

Reviewing files that changed from the base of the PR and between c1efe65 and 55c29fe.

📒 Files selected for processing (2)
  • framework/src/main/java/org/checkerframework/framework/util/typeinference8/types/VariableBounds.java
  • framework/tests/h1h2checker/QualifierBoundDirection.java

📝 Walkthrough

Walkthrough

addConstraintsFromComplementaryBounds now propagates qualifier bounds in the correct direction between inference variables. Lower-bound relationships transfer equal and upper qualifiers as upper bounds. Upper-bound relationships transfer equal and lower qualifiers as lower bounds. The new QualifierBoundDirection test covers these directions, target-typed and untyped inference, and the expected needH1S2 diagnostic.

Possibly related PRs

Suggested reviewers: smillst

Merge Risk: ⚪ Minimal · up to 55c29

This localized qualifier-bound propagation change has no actionable merge-blocking risk identified at the current head and is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…test

Add a test for the case where the bound relating two inference variables
is an upper bound whose type is a use of a variable, and document what
each test depends on so that it cannot be silently weakened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@smillst
smillst merged commit 040453f into typetools:master Aug 17, 2026
23 checks passed
@smillst
smillst deleted the type-inference-review2-fix-3 branch August 17, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants