-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go2go: receiver parameter inference for embedded methods fails (not implemented) #39901
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
I'm not sure if it's the same issue or not, but the below works if you name the member of
In this example changing to However, making that change to the example in the OP causes a stack trace. |
Here's the minimal crashing sample:
|
Thanks for this report. The initial error is known (as in "not fully implemented"). The 2nd issue you are mentioning is unrelated. I filed a separate issue #39938 for that. |
Quick follow-up: The 2nd error you are mentioning is expected: Note that in type foo struct {
base (foo)
} the On the other hand, once you write, for instance type foo struct {
f base(foo)
} you have a field |
That makes sense, and I think highlights that using () for this many different things is confusing. It seems like half the generics complaints on the mailing list are about this and I'm starting to agree with the criticism :) |
The various sub-issues have been addressed here. The remaining issue ( |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
I ran this file:
What did you expect to see?
I expected at least one of x or y to have an
A()
method from embedding.What did you see instead?
(thanks for the quick fix for #39881!)
The text was updated successfully, but these errors were encountered: