Fix generic interface method dispatch for multi-argument types#3453
Conversation
- Loop variable reuse destroyed GenParamCount; KeyValuePair<TKey,TValue> only drained first arg, desynchronized parsers
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/CLR/Core/TypeSystem.cpp`:
- Around line 9119-9147: Refactor the duplicated drain logic in
MatchSignatureForVirtualDispatch by extracting the repeated parser.Advance loop
into a small helper such as DrainGenericInstSubtree. Both
DATATYPE_VAR/DATATYPE_GENERICINST branches should call the helper with the
appropriate CLR_RT_SignatureParser instance and targetAvail value, then continue
on success or return false on failure. Keep the helper near TypeSystem.cpp so
the two branches in MatchSignatureForVirtualDispatch are flattened and the
nesting/duplication is removed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: d69393eb-6e41-445b-8d74-feddbfc49951
📒 Files selected for processing (1)
src/CLR/Core/TypeSystem.cpp
Description
Motivation and Context
How Has This Been Tested?
Screenshots
Types of changes
Checklist