mirror of
https://github.com/golang/go
synced 2024-11-11 22:20:22 -07:00
spec: clarify type properties
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
This commit is contained in:
parent
acb03b8028
commit
6f3b84a757
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user