diff --git a/doc/go_spec.html b/doc/go_spec.html index ecd2f084c9..176e1a755d 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -1290,8 +1290,8 @@ UnderlyingType = "~" Type .
An interface type is specified by a list of interface elements. -An interface element is either a method or a type element, -where a type element is a union of one or more type terms. +An interface element is either a method or a type element, +where a type element is a union of one or more type terms. A type term is either a single type or a single underlying type.
@@ -1926,7 +1926,60 @@ x T x is not representable by a value of T because 1e1000 float64 1e1000 overflows to IEEE +Inf after rounding -
+An interface specification which contains type elements
+that are not interface 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: +
+ +T
+ or ~T is the set consisting of the type T.
+ 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. +
+ ++Examples of interfaces with their specific types: +
+ +
+type Celsius float32
+type Kelvin float32
+
+interface{} // no specific types
+interface{ int } // int
+interface{ ~string } // string
+interface{ int|~string } // int, string
+interface{ Celsius|Kelvin } // Celsius, Kelvin
+interface{ int; string } // no specific types (intersection is empty)
+
An interface T is called structural if one of the following
@@ -1966,9 +2019,6 @@ Examples of structural interfaces with their structural types:
-type Celsius float32
-type Kelvin float32
-
interface{ int } // int
interface{ Celsius|Kelvin } // float32
interface{ ~chan int } // chan int