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

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

Comments

@griesemer
Copy link
Contributor

@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
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 24, 2022

Change https://go.dev/cl/387836 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
Reviewed-on: https://go-review.googlesource.com/c/go/+/387836
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
@gopherbot
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
Labels
early-in-cycle NeedsFix
Projects
None yet
Development

No branches or pull requests

2 participants