Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/types, types2: simplify type-checking of method receivers with type parameters #51343

griesemer opened this issue Feb 24, 2022 · 2 comments
early-in-cycle NeedsFix


Copy link

@griesemer griesemer commented Feb 24, 2022

This is a reminder issue to clean up handling of method receivers in Checker.funcType.
Receiver parameter handling relies on delayed instantiation and uses constraint type inference. At least the latter should not be used.
See also #51339.

cc: @findleyr

@griesemer griesemer added NeedsFix early-in-cycle labels Feb 24, 2022
@griesemer griesemer added this to the Go1.19 milestone Feb 24, 2022
@griesemer griesemer self-assigned this Feb 24, 2022
Copy link

@gopherbot gopherbot commented Feb 24, 2022

Change mentions this issue: types2: method recv type parameter count must match base type parameter count

gopherbot pushed a commit that referenced this issue Feb 24, 2022
…pe parameter count

Check receiver type parameter count when type checking the method
signature and report a suitable error (don't rely on delayed
instantiation and possibly constraint type inference).

While at it, simplify blank name recoding and type bound rewriting.

Stop-gap measure to avoid crashes in the compiler.

Fixes #51339.
For #51343.

Change-Id: Idbe2d32d69b66573ca973339f8924b349d2bc9cc
Trust: Robert Griesemer <>
Reviewed-by: David Chase <>
Reviewed-by: Robert Findley <>
Copy link

@gopherbot gopherbot commented Mar 16, 2022

This issue is currently labeled as early-in-cycle for Go 1.19.
That time is now, so a friendly reminder to look at it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
early-in-cycle NeedsFix
None yet

No branches or pull requests

2 participants