-
Notifications
You must be signed in to change notification settings - Fork 18k
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: can't assign pointer from generic type to generic interface satisfied by pointer receiver #47747
Comments
Simpler repro:
Works with go2go: https://go2goplay.golang.org/p/TSQHwwv_p3o |
CC @ianlancetaylor @griesemer because I'm not actually sure what the rules are around this case. |
Simpler reproducer: https://go2goplay.golang.org/p/NLPVJOJuWIY (works with go2go but not with current compiler). |
Direct reproducer: package p
type T[P any] P
func (T[_]) m() {}
func _[P any](x *T[P]) {
x.m()
} |
Change https://golang.org/cl/342990 mentions this issue: |
Change https://golang.org/cl/342991 mentions this issue: |
…ed types Pointers to type parameters don't have methods, but pointers to defined types whose underlying types are type parameters may have methods. Fix the respective test. For #47747. Change-Id: I1de47be094ed9297f0e7782538011657c37c5adc Reviewed-on: https://go-review.googlesource.com/c/go/+/342990 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
On tip (a304273) with
-gcflags -G=3
.Repro:
Compiler aborts with:
Works with go2go: https://go2goplay.golang.org/p/HKqbj1Y6Ahh
The text was updated successfully, but these errors were encountered: