]> Cypherpunks repositories - gostls13.git/commitdiff
spec: be more precise about underlying types of predeclared types
authorRobert Griesemer <gri@golang.org>
Thu, 6 Mar 2014 03:37:44 +0000 (19:37 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 6 Mar 2014 03:37:44 +0000 (19:37 -0800)
The underlying type of the predeclared type error is not itself,
but the interface it is defined as.

Fixes #7444.

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

doc/go_spec.html

index dada50357498c44c68424421bb9d38779004989a..b89aafebe74640a4208dd7241702e2aa4cbc5343 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of March 5, 2014",
+       "Subtitle": "Version of March 6, 2014",
        "Path": "/ref/spec"
 }-->
 
@@ -674,7 +674,8 @@ types, the dynamic type is always the static type.
 
 <p>
 Each type <code>T</code> has an <i>underlying type</i>: If <code>T</code>
-is a predeclared type or a type literal, the corresponding underlying
+is one of the predeclared boolean, numeric, or string types, or a type literal,
+the corresponding underlying
 type is <code>T</code> itself. Otherwise, <code>T</code>'s underlying type
 is the underlying type of the type to which <code>T</code> refers in its
 <a href="#Type_declarations">type declaration</a>.