Skip to content

Remove special case#7798

Open
mernst wants to merge 1 commit into
typetools:masterfrom
mernst:type-inf-review-inference-type
Open

Remove special case#7798
mernst wants to merge 1 commit into
typetools:masterfrom
mernst:type-inf-review-inference-type

Conversation

@mernst

@mernst mernst commented Jul 5, 2026

Copy link
Copy Markdown
Member

Maybe instead of being removed, the test should be against mapping? In any event, please add comments to clarify.

@coderabbitai

coderabbitai Bot commented Jul 5, 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

Run ID: 8c85061a-d558-4bbe-9b9b-c165be3a06a7

📥 Commits

Reviewing files that changed from the base of the PR and between 5cc3a3a and 61b3b89.

📒 Files selected for processing (1)
  • framework/src/main/java/org/checkerframework/framework/util/typeinference8/types/InferenceType.java
💤 Files with no reviewable changes (1)
  • framework/src/main/java/org/checkerframework/framework/util/typeinference8/types/InferenceType.java

📝 Walkthrough

Walkthrough

This change modifies the applyInstantiations method in InferenceType.java. The early-return condition now checks whether any inference variables have non-null instantiations, rather than checking if the overall mapping is empty. Additionally, each instantiated AnnotatedTypeMirror is now initialized via context.typeFactory.initializeAtm(...) before being added to the substitution mapping used for type rebuilding.

Changes

File Change Summary
InferenceType.java Changed early-return condition in applyInstantiations from checking map.isEmpty() to checking whether inferred type variables have instantiations; instantiated types are now initialized via initializeAtm before being added to the mapping.

Related issues: None found.

Related PRs: None found.

Suggested labels: bug, type-inference

Suggested reviewers: wmdietl, smillst

🌱 A small fix takes root,
instantiations now atm-bound,
empty maps no more mislead,
type variables lead the way indeed.

🚥 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.

@mernst mernst requested a review from smillst July 5, 2026 15:26
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