]> Cypherpunks.ru repositories - gostls13.git/commitdiff
spec: fix prose about promoted methods of embedded fields
authorRobert Griesemer <gri@golang.org>
Thu, 12 May 2022 20:25:01 +0000 (13:25 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 12 May 2022 22:29:02 +0000 (22:29 +0000)
The types of embedded fields must be named, but they don't
need to be defined types (e.g. if the type name is an alias).

Fixes #41687.

Change-Id: Ib9de65dfab0e23c27d8303875fa45c217aa03331
Reviewed-on: https://go-review.googlesource.com/c/go/+/406054
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
doc/go_spec.html

index 3376c47065c82d291bead89b4a3179749d80091c..1caaba1ccb95b690188d0493619d0b01b08fd770 100644 (file)
@@ -1089,7 +1089,7 @@ of a struct except that they cannot be used as field names in
 </p>
 
 <p>
-Given a struct type <code>S</code> and a <a href="#Type_definitions">defined type</a>
+Given a struct type <code>S</code> and a <a href="#Types">named type</a>
 <code>T</code>, promoted methods are included in the method set of the struct as follows:
 </p>
 <ul>