Skip to content

Fix mapTypeArguments()#7793

Closed
mernstcheckerframework wants to merge 1 commit into
typetools:masterfrom
mernst:type-argument-mapper-1
Closed

Fix mapTypeArguments()#7793
mernstcheckerframework wants to merge 1 commit into
typetools:masterfrom
mernst:type-argument-mapper-1

Conversation

@mernstcheckerframework

Copy link
Copy Markdown
Contributor

No description provided.

@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: 8b633172-1357-4faf-9cda-3fe193786bbd

📥 Commits

Reviewing files that changed from the base of the PR and between bc5f09e and b680a57.

📒 Files selected for processing (1)
  • framework/src/main/java/org/checkerframework/framework/util/TypeArgumentMapper.java

📝 Walkthrough

Walkthrough

This change fixes a loop state bug in `TypeArgumentMapper.mapTypeArguments`. Previously, the `current` variable was never reassigned within the while loop that traverses `pathToSupertype`, causing subsequent iterations to continue processing the same `TypeRecord` instead of advancing. The fix adds a single line assigning `current = next` at the end of the loop body, ensuring the traversal correctly progresses through the path on each iteration.

Changes

Cohort / File(s) Change Summary
Loop fix in mapTypeArguments — `TypeArgumentMapper.java` Adds `current = next` assignment inside the while loop to correctly advance the `TypeRecord` during path traversal.

Related issues: None specified.

Related PRs: None specified.

Suggested labels: bug, framework

Suggested reviewers: None specified.

Poem

A rabbit hopped along a path so true,
Stuck on one record, not knowing what to do.
"current" stayed still while "next" waved hello,
Now with one small line, watch the traversal flow!
Hop by hop, the mapper finds its way anew. 🐇

🚥 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 closed this Jul 5, 2026
@mernst mernst deleted the type-argument-mapper-1 branch July 5, 2026 04:00
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