-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: implict dereference using constraints doesn't compile with -G=3 as expected #47713
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
Comments
AFAIK dev.typeparams has been now merged into master, so I'm dropping that from the title. Since this appears to be related to generics in the compiler frontend (?), CC @griesemer @mdempsky @danscales |
I'll try it on the master branch too! Thanks for the update. |
This is an error reported by the compiler when writing object data to disk. The compiler front-end (types2, etc.) accepts this code just fine. |
I think this is actually an issue with method wrapper generation with -G=3 mode. The error message is because the generated code is not well typed. (FWIW, it compiles and runs okay with |
This relates to some discrepancy in the naming of types, which leads to problems with wrapper generation. I'll have a fix in the next day or so. |
Change https://golang.org/cl/344613 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, on current HEAD of
dev.typeparams
.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do? What did you expect to see? What did you see instead?
Using the following program, when compiling I expected an implicit de-reference of the method receiver:
https://github.com/abraithwaite/go-typeparams-issues/blob/master/bug-report-1/main.go
I expected no compilation error. This is what I saw instead:
I'm not sure why GenericSerializable is being passed as a pointer receiver instead of a value receiver as I've defined for
.Send
.I saw this also: #47031 Maybe it's related? Seemed different enough to warrant opening this issue.
The text was updated successfully, but these errors were encountered: