mirror of
https://github.com/golang/go
synced 2024-11-12 05:50:21 -07:00
spec: reject top-level init names
Fixes #4586. R=golang-dev, remyoudompheng, r CC=golang-dev https://golang.org/cl/7307082
This commit is contained in:
parent
a801c8813d
commit
0a22018d46
@ -1,6 +1,6 @@
|
|||||||
<!--{
|
<!--{
|
||||||
"Title": "The Go Programming Language Specification",
|
"Title": "The Go Programming Language Specification",
|
||||||
"Subtitle": "Version of February 9, 2013",
|
"Subtitle": "Version of February 11, 2013",
|
||||||
"Path": "/ref/spec"
|
"Path": "/ref/spec"
|
||||||
}-->
|
}-->
|
||||||
|
|
||||||
@ -5472,8 +5472,10 @@ func init()
|
|||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
defined in its source.
|
defined in its source.
|
||||||
A package may contain multiple
|
A package-scope or file-scope identifier
|
||||||
<code>init</code> functions, even
|
with name <code>init</code> may only be
|
||||||
|
declared to be a function with this signature.
|
||||||
|
Multiple such functions may be defined, even
|
||||||
within a single source file; they execute
|
within a single source file; they execute
|
||||||
in unspecified order.
|
in unspecified order.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user