diff --git a/doc/go_spec.html b/doc/go_spec.html index c71126d25d..7f25fff137 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -685,11 +685,9 @@ If a variable has not yet been assigned a value, its value is the

Types

-A type determines the set of values and operations specific to values of that -type. Types may be named or unnamed. Named types are specified -by a (possibly qualified) -type name; unnamed types are specified -using a type literal, which composes a new type from existing types. +A type determines a set of values together with operations and methods specific +to those values. A type may be denoted by a type name, if it has one, +or specified using a type literal, which composes a type from existing types.

@@ -702,6 +700,7 @@ TypeLit   = ArrayType | StructType | PointerType | FunctionType | InterfaceType
 

Named instances of the boolean, numeric, and string types are predeclared. +Other named types are introduced with type declarations. Composite types—array, struct, pointer, function, interface, slice, map, and channel types—may be constructed using type literals. @@ -717,16 +716,23 @@ is the underlying type of the type to which T refers in its

-   type T1 string
-   type T2 T1
-   type T3 []T1
-   type T4 T3
+type (
+	A1 = string
+	A2 = A1
+)
+
+type (
+	B1 string
+	B2 B1
+	B3 []B1
+	B4 B3
+)
 

-The underlying type of string, T1, and T2 -is string. The underlying type of []T1, T3, -and T4 is []T1. +The underlying type of string, A1, A2, B1, +and B2 is string. +The underlying type of []B1, B3, and B4 is []B1.

Method sets

@@ -1417,11 +1423,10 @@ Two types are either identical or different.

-Two named types are identical if their type names originate in the same -TypeSpec. -A named and an unnamed type are always different. Two unnamed types are identical -if the corresponding type literals are identical, that is, if they have the same -literal structure and corresponding components have identical types. In detail: +A defined type is always different from any other type. +Otherwise, two types are identical if their underlying type literals are +structurally equivalent; that is, they have the same literal structure and corresponding +components have identical types. In detail: