-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/compile: "methods cannot have type parameters" compiler error reported twice #50317
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
Thanks. Marking for 1.18 but not a release blocker. |
Change https://golang.org/cl/376054 mentions this issue: |
Change https://golang.org/cl/376215 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jan 7, 2022
For #50317. Change-Id: I24ccf333c380283a36b573ef8fc3e7fcd71bd17f Reviewed-on: https://go-review.googlesource.com/c/go/+/376215 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Dan Scales <danscales@google.com> Trust: Dan Scales <danscales@google.com>
jproberts
pushed a commit
to jproberts/go
that referenced
this issue
Jun 21, 2022
Move switch to enable method type parameters entirely to the parser, by adding the mode AllowMethodTypeParams. Ensure that the error messages are consistent. Remove unnecessary code in the type checker. Fixes golang#50317. Change-Id: I4f3958722400bdb919efa4c494b85cf62f4002bb Reviewed-on: https://go-review.googlesource.com/c/go/+/376054 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
jproberts
pushed a commit
to jproberts/go
that referenced
this issue
Jun 21, 2022
For golang#50317. Change-Id: I24ccf333c380283a36b573ef8fc3e7fcd71bd17f Reviewed-on: https://go-review.googlesource.com/c/go/+/376215 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Dan Scales <danscales@google.com> Trust: Dan Scales <danscales@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://gotipplay.golang.org/p/-LsXizeqqJK
What did you expect to see?
The
methods cannot have type parameters
compiler errorWhat did you see instead?
Not a big deal, but it probably would be a better DX to report
methods cannot have type parameters
only once.The text was updated successfully, but these errors were encountered: