]> Cypherpunks repositories - gostls13.git/commitdiff
go spec: clarifying variable declaractions w/ constants
authorRobert Griesemer <gri@golang.org>
Mon, 17 Oct 2011 19:54:18 +0000 (12:54 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 17 Oct 2011 19:54:18 +0000 (12:54 -0700)
Fixes #2377.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5267048

doc/go_spec.html

index 4c1ecef3536e9b74e21183dcf33c30e380b29d3a..7a3161c3ee04e37fb1ba2b0581d89cfac90daccf 100644 (file)
@@ -1,5 +1,5 @@
 <!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of October 13, 2011 -->
+<!-- subtitle Version of October 17, 2011 -->
 
 <!--
 TODO
@@ -1784,15 +1784,17 @@ of the expression list.
 <p>
 If the type is absent and the corresponding expression evaluates to an
 untyped <a href="#Constants">constant</a>, the type of the declared variable
-is <code>bool</code>, <code>int</code>, <code>float64</code>, or <code>string</code>
-respectively, depending on whether the value is a boolean, integer,
-floating-point, or string constant:
+is <code>bool</code>, <code>int</code>, <code>float64</code>,
+<code>complex128</code>, or <code>string</code> respectively, depending on
+whether the value is a boolean, integer, floating-point, complex, or string
+constant:
 </p>
 
 <pre>
 var b = true    // t has type bool
 var i = 0       // i has type int
 var f = 3.0     // f has type float64
+var c = 1i      // c has type complex128
 var s = "OMDB"  // s has type string
 </pre>