Commit 8d77d2c8 authored by Robert Griesemer's avatar Robert Griesemer

spec: be more precise about underlying types of predeclared types

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
parent 3a7fe36d
<!--{
"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>.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment