From 85e451e2fe3aae0c5d066cd0ee5f178877139188 Mon Sep 17 00:00:00 2001
From: Robert Griesemer
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.
-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) {