Commit 8554fd6e authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile: document reserved import paths

Fixes #20708.

Change-Id: I2db450947b64b8b5af3822c7fbcc3e99746ae9d7
Reviewed-on: https://go-review.googlesource.com/87496Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent c13e0e8c
......@@ -1974,6 +1974,11 @@ func addinit(n *Node, init []*Node) *Node {
return n
}
// The linker uses the magic symbol prefixes "go." and "type."
// Avoid potential confusion between import paths and symbols
// by rejecting these reserved imports for now. Also, people
// "can do weird things in GOPATH and we'd prefer they didn't
// do _that_ weird thing" (per rsc). See also #4257.
var reservedimports = []string{
"go",
"type",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment