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

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
Copy link
Author

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

@golang golang locked and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants