]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify type properties
authorRobert Griesemer <gri@golang.org>
Wed, 7 May 2014 15:42:08 +0000 (08:42 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 7 May 2014 15:42:08 +0000 (08:42 -0700)
If the underlying type of a type T is a boolean, numeric,
or string type, then T is also a boolean, numeric, or
string type, respectively.

Not a language change.

Fixes #7551.

LGTM=iant, rsc, robert.hencke, r
R=r, rsc, iant, ken, robert.hencke
CC=golang-codereviews
https://golang.org/cl/100130044

doc/go_spec.html

index e6831e90918a7aee63cbcf0837d91ed88a3277af..496a7b2c3bd07b7ca66c6bb4e580ef6d3f568c95 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of March 7, 2014",
+       "Subtitle": "Version of May 7, 2014",
        "Path": "/ref/spec"
 }-->
 
@@ -1771,9 +1771,9 @@ last non-empty expression list.
 
 <p>
 A type declaration binds an identifier, the <i>type name</i>, to a new type
-that has the same <a href="#Types">underlying type</a> as
-an existing type.  The new type is <a href="#Type_identity">different</a> from
-the existing type.
+that has the same <a href="#Types">underlying type</a> as an existing type,
+and operations defined for the existing type are also defined for the new type.
+The new type is <a href="#Type_identity">different</a> from the existing type.
 </p>
 
 <pre class="ebnf">