Skip to content
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

Implementing an interface via embedded struct #40228

Closed
ivanmemruk opened this issue Jul 15, 2020 · 1 comment
Closed

Implementing an interface via embedded struct #40228

ivanmemruk opened this issue Jul 15, 2020 · 1 comment

Comments

@ivanmemruk
Copy link

@ivanmemruk ivanmemruk commented Jul 15, 2020

What version of Go are you using (go version)?

$ go version
go version go1.13.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

Minimal example:
https://play.golang.org/p/UPhSamZO-gp

What did you expect to see?

foo() returns nil, println() must never happen

What did you see instead?

error != nil is true, println() says (0x486f20,0x0)

@ivanmemruk ivanmemruk closed this Jul 15, 2020
@ivanmemruk
Copy link
Author

@ivanmemruk ivanmemruk commented Jul 15, 2020

Got an answer on StackOverflow: https://stackoverflow.com/questions/62913430/implementing-an-interface-via-an-embedded-struct - this is expected behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.