diff --git a/doc/go_spec.html b/doc/go_spec.html index 4700548cb2..11f44d896d 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -1971,39 +1971,38 @@ x T x is not representable by a value of T because
An interface specification which contains type elements
-that are not interface types defines a (possibly empty) set of specific types.
+defines a (possibly empty) set of specific types.
Loosely speaking, these are the types T
that appear in the
interface definition in terms of the form T
, ~T
,
or in unions of such terms.
-More precisely, for a given interface, the set of specific types is defined as follows: +More precisely, for a given interface, the set 𝑆 of specific types is defined as follows:
T
+ or ~T
, 𝑆 is the set consisting of the type T
.
T
- or ~T
is the set consisting of the type T
.
- t1|t2|…|tn
- is the union of the specific types of the terms.
+ t1|t2|…|tn
,
+ 𝑆 is the union of the specific types of the terms.
-If the set of specific types is empty, the interface has no specific types. +If 𝑆 is empty, the interface has no specific types. +An interface may have specific types even if its type set +is empty.
@@ -2019,6 +2018,8 @@ interface{ int } // int interface{ ~string } // string interface{ int|~string } // int, string interface{ Celsius|Kelvin } // Celsius, Kelvin +interface{ int; m() } // int (but type set is empty because int has no method m) +interface{ int; any } // no specific types (intersection is empty) interface{ int; string } // no specific types (intersection is empty) @@ -3980,7 +3981,8 @@ pt.Scale(3.5) // method call with receiver pt
If f
denotes a parameterized function, it must be
-instantiated before it can be called.
+instantiated before it can be called
+or used as a function value.
@@ -4807,7 +4809,7 @@ Only V
is a type parameter and a value of each
specific type of V
can be converted to T
.
T
is a type parameter and x
can can be converted to each
+Only T
is a type parameter and x
can be converted to each
specific type of T
.