From 917c5fb8ec48e22459d77e3849e6d388f93d3260 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Thu, 14 Jun 2012 13:23:46 +0200 Subject: Imported Upstream version 1.0.2 --- doc/go_spec.html | 64 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 20 deletions(-) (limited to 'doc/go_spec.html') diff --git a/doc/go_spec.html b/doc/go_spec.html index 8cb257a59..90acc1704 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -684,6 +684,8 @@ consists of all methods with receiver type T. The method set of the corresponding pointer type *T is the set of all methods with receiver *T or T (that is, it also contains the method set of T). +Further rules apply to structs containing anonymous fields, as described +in the section on struct types. Any other type has an empty method set. In a method set, each method must have a unique method name. @@ -955,28 +957,39 @@ struct {

-Fields and methods (§Method declarations) of an anonymous field are -promoted to be ordinary fields and methods of the struct (§Selectors). -The following rules apply for a struct type S and -a type named T: +A field or method f of an +anonymous field in a struct x is called promoted if +x.f is a legal selector that denotes +that field or method f.

-