]> Cypherpunks repositories - gostls13.git/commitdiff
mem.html: nit
authorRuss Cox <rsc@golang.org>
Fri, 13 Mar 2009 02:04:56 +0000 (19:04 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 13 Mar 2009 02:04:56 +0000 (19:04 -0700)
go_spec.html: document const type propagation

R=ken
OCL=26223
CL=26225

doc/go_spec.html

index 52636b7ba34a7657b1d4d0ea5aa907a82bc3ee2d..315df8f1987ecadf7aaeee810c7bbfeff373cfaf 100644 (file)
@@ -1441,7 +1441,7 @@ right.
 <pre class="grammar">
 ConstDecl      = "const" ( ConstSpec | "(" [ ConstSpecList ] ")" ) .
 ConstSpecList  = ConstSpec { ";" ConstSpec } [ ";" ] .
-ConstSpec      = IdentifierList [ CompleteType ] [ "=" ExpressionList ] .
+ConstSpec      = IdentifierList [ [ CompleteType ] "=" ExpressionList ] .
 
 IdentifierList = identifier { "," identifier } .
 ExpressionList = Expression { "," Expression } .
@@ -1473,8 +1473,7 @@ const u, v float = 0, 3      // u = 0.0, v = 3.0
 Within a parenthesized <code>const</code> declaration list the
 expression list may be omitted from any but the first declaration.
 Such an empty list is equivalent to the textual substitution of the
-first preceding non-empty expression list.
-(TODO: Substitute type from that declaration too?)
+first preceding non-empty expression list, and its type if any.
 Omitting the list of expressions is therefore equivalent to
 repeating the previous list.  The number of identifiers must be equal
 to the number of expressions in the previous list.