Skip to content

Go: Only output origin constraints for methods - #22399

Open
jketema wants to merge 4 commits into
github:mainfrom
jketema:jketema/go-follow
Open

Go: Only output origin constraints for methods#22399
jketema wants to merge 4 commits into
github:mainfrom
jketema:jketema/go-follow

Conversation

@jketema

@jketema jketema commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Addresses #22042 (comment)

@github-actions github-actions Bot added the Go label Aug 20, 2026
@jketema
jketema force-pushed the jketema/go-follow branch 3 times, most recently from e9fe858 to bb92ed7 Compare August 20, 2026 14:31
@jketema
jketema force-pushed the jketema/go-follow branch from bb92ed7 to 2178247 Compare August 20, 2026 14:34
@jketema
jketema marked this pull request as ready for review August 20, 2026 15:21
@jketema
jketema requested review from a team as code owners August 20, 2026 15:21
Copilot AI balanced review requested due to automatic review settings August 20, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread go/extractor/extractor.go

var typeParamParent map[*types.TypeParam]typeParamParentEntry = make(map[*types.TypeParam]typeParamParentEntry)

var typeParamOrigin map[*types.TypeParam]*types.TypeParam = make(map[*types.TypeParam]*types.TypeParam)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. That also applies to the pre-existing typeParamParent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 18beab9

Comment thread go/extractor/extractor.go Outdated
jketema and others added 2 commits August 20, 2026 17:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants