]> Cypherpunks repositories - gostls13.git/commitdiff
There should not be a prohibition against embedding an
authorIan Lance Taylor <iant@golang.org>
Mon, 17 Aug 2009 18:40:57 +0000 (11:40 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 17 Aug 2009 18:40:57 +0000 (11:40 -0700)
interface type in a struct.  It is meaningful and the
compilers support it.

R=gri
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=33378
CL=33384

doc/go_spec.html

index c6c75ddae7524d157b9c18dc55e94c8002952057..768084385b1980aef58aa5ebaf6999b4f3198a1e 100644 (file)
@@ -695,8 +695,8 @@ struct {
 A field declared with a type but no field identifier is an <i>anonymous field</i>.
 Such a field type must be specified as
 a type name <code>T</code> or as a pointer to a type name <code>*T</code>,
-and <code>T</code> itself, may not be
-a pointer or interface type. The unqualified type name acts as the field identifier.
+and <code>T</code> itself may not be
+a pointer type. The unqualified type name acts as the field identifier.
 </p>
 
 <pre>