-
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: cannot use .this ( type *T[interface{}]) as type T[go.shape.interface {}_0] in T[go.shape.interface {}_0].Method #50486
Comments
Maybe related #50419 cc @danscales |
Even though the gotip playground example is still failing, I can't seem to reproduce this locally. I create the module directory with main.go, go.mod, and fp/fp.go, and when I do 'go run main.go, everything runs fine. Everything runs fine locally at both 07525e1 and current tip 11b28e7 (and also the beta1 release becaeea). I also tried building with GOARCH=386 (since I thought the playground is sometimes a 32-bit machine), but that also worked fine. Is there something different about the gotip playground that I need to account for? Can anyone else reproduce locally? I'm missing something. |
Oops, sorry about that, there was something mixed up in my local setup. Now I can reproduce it fine. Will take a look. |
OK, I understand the issue and have a fix. (Not related to #50419, since that relates to the use of blanks for typeparams.) |
Change https://golang.org/cl/377094 mentions this issue: |
The loading of the base type in typ0() may cause s.Def to be defined for the instantiated type, so load the base type before checking s.Def. Fixes golang#50486 Change-Id: Ic039bc8f774dda534f4ccd1f920220b7a10dede6 Reviewed-on: https://go-review.googlesource.com/c/go/+/377094 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?The gotip playground
What did you do?
https://gotipplay.golang.org/p/vuF7acfKTIv
What did you expect to see?
No Error.
What did you see instead?
If I remove ToSeq or Map method of Iterator, the error goes away.
The text was updated successfully, but these errors were encountered: