...
1
2
3
4
5 package main
6
7 import (
8 "fmt"
9 "os"
10 "reflect"
11 )
12
13
14 var v1 T
15 var v2 = v1.L
16
17
18 var v3 = Issue8478{P: (*byte)(nil), Q: (**byte)(nil), R: (***byte)(nil)}
19
20
21 var v4 = N{}
22 var v5 = A{}
23 var v6 = B{}
24
25
26 var v7 = S{}
27
28
29 var _ = issue38649{X: 0}
30
31
32 var _ = Issue48396{Fd: 1, Bpf_fd: 2}
33
34 func main() {
35 pass := true
36
37
38
39
40
41
42 bitfieldType := reflect.TypeOf(bitfields{})
43 check := func(name string) {
44 _, ok := bitfieldType.FieldByName(name)
45 if ok {
46 fmt.Fprintf(os.Stderr, "found unexpected bitfields field %s\n", name)
47 pass = false
48 }
49 }
50 check("Short1")
51 check("Short2")
52 check("Short3")
53
54 if !pass {
55 os.Exit(1)
56 }
57 }
58
View as plain text