mirror of
https://github.com/golang/go
synced 2024-11-25 11:48:04 -07:00
spec: be clearer about the scope of a package name
We have the notion of a PackageName, not package identifier. As is, it could construed that imports that rename a package don't have an "imported package identifier" but a local one. R=r, rsc, iant, ken, dsymonds CC=golang-dev https://golang.org/cl/6858049
This commit is contained in:
parent
6a1036422f
commit
e126763045
@ -1,6 +1,6 @@
|
||||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of November 17, 2012",
|
||||
"Subtitle": "Version of November 21, 2012",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
@ -1529,7 +1529,7 @@ Go is lexically scoped using blocks:
|
||||
or function (but not method) declared at top level (outside any
|
||||
function) is the package block.</li>
|
||||
|
||||
<li>The scope of an imported package identifier is the file block
|
||||
<li>The scope of the package name of an imported package is the file block
|
||||
of the file containing the import declaration.</li>
|
||||
|
||||
<li>The scope of an identifier denoting a function parameter or
|
||||
|
Loading…
Reference in New Issue
Block a user