Home | History | Annotate | Download | only in testdata
      1 // The package e is a go/doc test for embedded methods. 
      2 PACKAGE e
      3 
      4 IMPORTPATH
      5 	testdata/e
      6 
      7 FILENAMES
      8 	testdata/e.go
      9 
     10 TYPES
     11 	// T1 has no embedded (level 1) M method due to conflict. 
     12 	type T1 struct {
     13 		t1
     14 		t2
     15 	}
     16 
     17 	// T2 has only M as top-level method. 
     18 	type T2 struct {
     19 		t1
     20 	}
     21 
     22 	// T2.M should appear as method of T2. 
     23 	func (T2) M()
     24 
     25 	// T3 has only M as top-level method. 
     26 	type T3 struct {
     27 		t1e
     28 		t2e
     29 	}
     30 
     31 	// T3.M should appear as method of T3. 
     32 	func (T3) M()
     33 
     34 	// 
     35 	type T4 struct{}
     36 
     37 	// T4.M should appear as method of T5 only if AllMethods is set. 
     38 	func (*T4) M()
     39 
     40 	// 
     41 	type T5 struct {
     42 		T4
     43 	}
     44 
     45 	// 
     46 	type U1 struct {
     47 		*U1
     48 	}
     49 
     50 	// U1.M should appear as method of U1. 
     51 	func (*U1) M()
     52 
     53 	// 
     54 	type U2 struct {
     55 		*U3
     56 	}
     57 
     58 	// U2.M should appear as method of U2 and as method of U3 only if ...
     59 	func (*U2) M()
     60 
     61 	// 
     62 	type U3 struct {
     63 		*U2
     64 	}
     65 
     66 	// U3.N should appear as method of U3 and as method of U2 only if ...
     67 	func (*U3) N()
     68 
     69 	// 
     70 	type U4 struct {
     71 		*u5
     72 	}
     73 
     74 	// U4.M should appear as method of U4. 
     75 	func (*U4) M()
     76 
     77 	// 
     78 	type V1 struct {
     79 		*V2
     80 		*V5
     81 	}
     82 
     83 	// 
     84 	type V2 struct {
     85 		*V3
     86 	}
     87 
     88 	// 
     89 	type V3 struct {
     90 		*V4
     91 	}
     92 
     93 	// 
     94 	type V4 struct {
     95 		*V5
     96 	}
     97 
     98 	// V4.M should appear as method of V2 and V3 if AllMethods is set. 
     99 	func (*V4) M()
    100 
    101 	// 
    102 	type V5 struct {
    103 		*V6
    104 	}
    105 
    106 	// 
    107 	type V6 struct{}
    108 
    109 	// V6.M should appear as method of V1 and V5 if AllMethods is set. 
    110 	func (*V6) M()
    111 
    112 	// 
    113 	type t1 struct{}
    114 
    115 	// t1.M should not appear as method in a Tx type. 
    116 	func (t1) M()
    117 
    118 	// 
    119 	type t1e struct {
    120 		t1
    121 	}
    122 
    123 	// t1.M should not appear as method in a Tx type. 
    124 	func (t1e) M()
    125 
    126 	// 
    127 	type t2 struct{}
    128 
    129 	// t2.M should not appear as method in a Tx type. 
    130 	func (t2) M()
    131 
    132 	// 
    133 	type t2e struct {
    134 		t2
    135 	}
    136 
    137 	// t2.M should not appear as method in a Tx type. 
    138 	func (t2e) M()
    139 
    140 	// 
    141 	type u5 struct {
    142 		*U4
    143 	}
    144 
    145