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/gc: go:nointerface pragma is undocumented #33737

Open
bsiegert opened this issue Aug 20, 2019 · 4 comments
Open

cmd/gc: go:nointerface pragma is undocumented #33737

bsiegert opened this issue Aug 20, 2019 · 4 comments

Comments

@bsiegert
Copy link
Contributor

@bsiegert bsiegert commented Aug 20, 2019

The Go compiler has a pragma

//go:nointerface

As far as I can tell, it prevents a method from being used to satisfy an interface. However, I cannot find any (public) documentation on it.

Even https://golang.org/src/cmd/compile/internal/gc/lex.go, which has comments for the other pragmas, does not describe this one.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Aug 20, 2019

That pragma is only enabled when the toolchain is built with GOEXPERIMENT=fieldtrack. So I think this issue is really that GOEXPERIMENT=fieldtrack doesn't have any meaningful documentation.

@bsiegert
Copy link
Contributor Author

@bsiegert bsiegert commented Aug 20, 2019

From what I have seen about the fieldtrack experiment, it seems pretty vestigial and never went anywhere. But I might be wrong.

@bsiegert
Copy link
Contributor Author

@bsiegert bsiegert commented Aug 20, 2019

@bcmills bcmills added this to the Unplanned milestone Aug 20, 2019
@bcmills bcmills added the help wanted label Aug 20, 2019
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Aug 20, 2019

The fieldtrack experiment is used, and should probably be better documented.

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
4 participants
You can’t perform that action at this time.