...
1
2
3
4
5 package p
6
7 import "unsafe"
8
9
10
11
12
13 type T interface {
14 m() interface {T}
15 E
16 }
17
18 var _ int = T.m(nil).m().e()
19
20 type E interface {
21 e() int
22 }
23
24
25
26
27 var _ int = C.m(nil).m().e()
28
29 type A B
30
31 type B interface {
32 m() interface{C}
33 E
34 }
35
36 type C A
37
38
39
40
41 type T1 interface {
42 m() interface{T1}
43 }
44
45 type T2 interface {
46 m() interface{T2}
47 }
48
49 func _(x T1, y T2) {
50
51
52
53
54
55
56
57 x = y
58 }
59
60 type T3 interface {
61 m() interface{T4}
62 }
63
64 type T4 interface {
65 m() interface{T3}
66 }
67
68 func _(x T1, y T3) {
69 x = y
70 }
71
72
73
74
75 var x1 T5 = T7(nil)
76
77 type T5 interface {
78 T6
79 }
80
81 type T6 interface {
82 m() T7
83 }
84 type T7 interface {
85 T5
86 }
87
88
89
90 func wrapNode() Node {
91 return wrapElement()
92 }
93
94 func wrapElement() Element {
95 return nil
96 }
97
98 type EventTarget interface {
99 AddEventListener(Event)
100 }
101
102 type Node interface {
103 EventTarget
104 }
105
106 type Element interface {
107 Node
108 }
109
110 type Event interface {
111 Target() Element
112 }
113
114
115
116
117 type T8 interface {
118 m() [unsafe.Sizeof(T8.m )]int
119 }
120
121 var _ = T8.m
122
View as plain text