Go: Only output origin constraints for methods - #22399
Open
jketema wants to merge 4 commits into
Open
Conversation
jketema
force-pushed
the
jketema/go-follow
branch
3 times, most recently
from
August 20, 2026 14:31
e9fe858 to
bb92ed7
Compare
jketema
force-pushed
the
jketema/go-follow
branch
from
August 20, 2026 14:34
bb92ed7 to
2178247
Compare
jketema
marked this pull request as ready for review
August 20, 2026 15:21
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures instantiated generic Go methods emit their origin type-parameter constraints.
Changes:
- Tracks origin type parameters for instantiated methods.
- Adds dependent-bound generic method coverage.
- Updates expected query results.
Show a summary per file
| File | Description |
|---|---|
go/extractor/extractor.go |
Maps instantiated method parameters to origin constraints. |
genericMethods.go |
Adds dependent-bound test cases. |
TypeParamType.expected |
Updates type-parameter results. |
getTypeParameter.expected |
Updates declaration results. |
getParameter.expected |
Updates parameter results. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Balanced
|
|
||
| var typeParamParent map[*types.TypeParam]typeParamParentEntry = make(map[*types.TypeParam]typeParamParentEntry) | ||
|
|
||
| var typeParamOrigin map[*types.TypeParam]*types.TypeParam = make(map[*types.TypeParam]*types.TypeParam) |
Contributor
Author
There was a problem hiding this comment.
Interesting. That also applies to the pre-existing typeParamParent
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Addresses #22042 (comment)