Commit 967a2b38 authored by Robert Griesemer's avatar Robert Griesemer

go spec: minor clarification of scope rule for functions

R=rsc, iant, r, r2
CC=golang-dev
https://golang.org/cl/4256050
parent 38a105e4
<!-- title The Go Programming Language Specification --> <!-- title The Go Programming Language Specification -->
<!-- subtitle Version of February 22, 2011 --> <!-- subtitle Version of March 3, 2011 -->
<!-- <!--
TODO TODO
...@@ -1431,8 +1431,8 @@ Go is lexically scoped using blocks: ...@@ -1431,8 +1431,8 @@ Go is lexically scoped using blocks:
<li>The scope of a predeclared identifier is the universe block.</li> <li>The scope of a predeclared identifier is the universe block.</li>
<li>The scope of an identifier denoting a constant, type, variable, <li>The scope of an identifier denoting a constant, type, variable,
or function declared at top level (outside any function) is the or function (but not method) declared at top level (outside any
package block.</li> function) is the package block.</li>
<li>The scope of an imported package identifier is the file block <li>The scope of an imported package identifier is the file block
of the file containing the import declaration.</li> of the file containing the import declaration.</li>
...@@ -5152,7 +5152,6 @@ The following minimal alignment properties are guaranteed: ...@@ -5152,7 +5152,6 @@ The following minimal alignment properties are guaranteed:
<h2 id="Implementation_differences"><span class="alert">Implementation differences - TODO</span></h2> <h2 id="Implementation_differences"><span class="alert">Implementation differences - TODO</span></h2>
<ul> <ul>
<li><span class="alert">Implementation does not honor the restriction on goto statements and targets (no intervening declarations).</span></li> <li><span class="alert">Implementation does not honor the restriction on goto statements and targets (no intervening declarations).</span></li>
<li><span class="alert">Gccgo: The <code>append</code> built-in function is not yet implemented.</span></li>
<li><span class="alert">Gccgo: Method expressions are partially implemented.</span></li> <li><span class="alert">Gccgo: Method expressions are partially implemented.</span></li>
<li><span class="alert">Gccgo: allows only one init() function per source file.</span></li> <li><span class="alert">Gccgo: allows only one init() function per source file.</span></li>
</ul> </ul>
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