Source file
test/fixedbugs/issue44378.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package a
17
18 type O interface{}
19 type IO int
20 type OS int
21
22 type A struct {
23 x int
24 }
25
26
27 func (p *A) UO(o O) {
28 p.r(o, o)
29 }
30 func (p *A) r(o1, o2 O) {
31 switch x := o1.(type) {
32 case *IO:
33 p.x = int(*x)
34 case *OS:
35 p.x = int(*x + 2)
36 }
37 }
38
39
40 var myverylongname0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 int ; func (p *A) UO2(o O) { p.r2(o, o); }; func (p *A) r2(o1, o2 O) { switch x := o1.(type) { case *IO: p.x = int(*x); case *OS: p.x = int(*x + 2); } }
41
View as plain text