Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
2d697d67
Commit
2d697d67
authored
Aug 22, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify pointer forward decls per ian's suggestion
R=r DELTA=13 (3 added, 7 deleted, 3 changed) OCL=14406 CL=14406
parent
2dabb652
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
go_lang.txt
doc/go_lang.txt
+6
-10
No files found.
doc/go_lang.txt
View file @
2d697d67
...
@@ -786,6 +786,7 @@ particular to dereference a channel pointer.
...
@@ -786,6 +786,7 @@ particular to dereference a channel pointer.
var ch *chan int;
var ch *chan int;
ch = new(chan int); // new returns type *chan int
ch = new(chan int); // new returns type *chan int
Function types
Function types
----
----
...
@@ -990,11 +991,13 @@ The following scope rules apply:
...
@@ -990,11 +991,13 @@ The following scope rules apply:
1. No identifier may be declared twice in a single scope.
1. No identifier may be declared twice in a single scope.
2. A language entity may only be referred to within its scope.
2. A language entity may only be referred to within its scope.
3. Field and method identifiers may be used only to select elements
3. Field and method identifiers may be used only to select elements
from the corresponding types. In effect, the field selector operator
from the corresponding types, and only after those types are fully
declared. In effect, the field selector operator
'.' temporarily re-opens the scope of such identifiers (see Expressions).
'.' temporarily re-opens the scope of such identifiers (see Expressions).
4. Forward declaration: A type of the form "*T" may be mentioned at a point
4. Forward declaration: A type of the form "*T" may be mentioned at a point
where "T" is not yet declared. The declaration of "T" must follow in the
where "T" is not yet declared. The full declaration of "T" must be within a
same package and "T" must be visible at the end of the block containing "*T".
block containing the forward declaration, and the forward declaration
refers to the innermost such full declaration.
Global declarations optionally may be marked for export with the reserved word
Global declarations optionally may be marked for export with the reserved word
"export". Local declarations can never be exported.
"export". Local declarations can never be exported.
...
@@ -1016,10 +1019,6 @@ TODO: Eventually we need to be able to restrict visibility of fields and methods
...
@@ -1016,10 +1019,6 @@ TODO: Eventually we need to be able to restrict visibility of fields and methods
Export should be identifier-based: an identifier is either exported or not, and thus
Export should be identifier-based: an identifier is either exported or not, and thus
visible or not in importing package.
visible or not in importing package.
[OLD
Declaration = ConstDecl | TypeDecl | VarDecl | FunctionDecl | ExportDecl .
END]
Const declarations
Const declarations
----
----
...
@@ -1738,9 +1737,6 @@ if omitted, the first two examples above can be abbreviated:
...
@@ -1738,9 +1737,6 @@ if omitted, the first two examples above can be abbreviated:
)
)
TODO: should iota work in var, type, func decls too?
Statements
Statements
----
----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment