diff --git a/doc/go_spec.html b/doc/go_spec.html index 5f640fb4b8..cf31cd3063 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1065,8 +1065,11 @@ ParameterDecl = [ IdentifierList ] [ "..." ] Type .
Within a list of parameters or results, the names (IdentifierList) must either all be present or all be absent. If present, each name -stands for one item (parameter or result) of the specified type; if absent, each -type stands for one item of that type. Parameter and result +stands for one item (parameter or result) of the specified type and +all non-blank names in the signature +must be unique. +If absent, each type stands for one item of that type. +Parameter and result lists are always parenthesized except that if there is exactly one unnamed result it may be written as an unparenthesized type.
@@ -1532,8 +1535,8 @@ Go is lexically scoped using blocks:-For a base type, the non-blank names of -methods bound to it must be unique. +A non-blank receiver identifier must be +unique in the method signature. +If the receiver's value is not referenced inside the body of the method, +its identifier may be omitted in the declaration. The same applies in +general to parameters of functions and methods. +
+ ++For a base type, the non-blank names of methods bound to it must be unique. If the base type is a struct type, the non-blank method and field names must be distinct.
@@ -2015,12 +2025,6 @@ with receiver type*Point
,
to the base type Point
.
--If the receiver's value is not referenced inside the body of the method, -its identifier may be omitted in the declaration. The same applies in -general to parameters of functions and methods. -
-
The type of a method is the type of a function with the receiver as first
argument. For instance, the method Scale
has type
@@ -4599,7 +4603,7 @@ func complexF2() (re float64, im float64) {