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

cmd/compile: generating wrapper functions for interface types #15330

Closed
mdempsky opened this issue Apr 16, 2016 · 1 comment
Closed

cmd/compile: generating wrapper functions for interface types #15330

mdempsky opened this issue Apr 16, 2016 · 1 comment

Comments

@mdempsky
Copy link
Member

mdempsky commented Apr 16, 2016

Compiling

package p
type f interface { g() }

emits instructions for a function named "".f.g. I'm pretty sure this is unnecessary. It looks like we're accidentally generating wrapper methods for interface types.

@mdempsky
Copy link
Member Author

I'm mistaken. That function is for the method expression f.g, such as in lines 121 and 126 of $GOROOT/test/method.go.

(TIL that method expressions can be for a method of an interface type.)

@golang golang locked and limited conversation to collaborators Apr 16, 2017
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