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: alias declarations should not permit "init" as alias name #17637

Closed
griesemer opened this issue Oct 27, 2016 · 2 comments
Closed
Milestone

Comments

@griesemer
Copy link
Contributor

Tracking issue.
Compiler needs to be updated as well.

@griesemer griesemer added this to the Go1.8 milestone Oct 27, 2016
@griesemer griesemer self-assigned this Oct 27, 2016
@gopherbot
Copy link

CL https://golang.org/cl/32106 mentions this issue.

@griesemer griesemer changed the title spec: alias declarations should not permit init,main as alias names spec: alias declarations should not permit "init" as alias name Oct 27, 2016
@griesemer griesemer changed the title spec: alias declarations should not permit "init" as alias name cmd/compile: alias declarations should not permit "init" as alias name Oct 27, 2016
@griesemer
Copy link
Contributor Author

The spec already categorically disallows the use of "init" except for function declarations. We only need to follow this rule in the compiler.

There's nothing special about "main": The spec permits top-level variables, functions, types, constants, and packages with name "main". Only the linker complains if there's a missing main.main.

@golang golang locked and limited conversation to collaborators Oct 27, 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