Source file
test/fixedbugs/issue22344.go
1
2
3
4
5
6
7
8 package main
9
10 import (
11 "unsafe"
12 )
13
14
15 const (
16 _ = iota
17 _ = len([iota]byte{})
18 _ = unsafe.Sizeof(iota)
19 _ = unsafe.Sizeof(func() { _ = iota })
20 _ = unsafe.Sizeof(func() { var _ = iota })
21 _ = unsafe.Sizeof(func() { const _ = iota })
22 _ = unsafe.Sizeof(func() { type _ [iota]byte })
23 _ = unsafe.Sizeof(func() { func() int { return iota }() })
24 )
25
26
27 const (
28 zero = iota
29 one = iota
30 _ = unsafe.Sizeof(func() {
31 var x [iota]int
32 var y [iota]int
33 const (
34 Zero = iota
35 One
36 Two
37 _ = unsafe.Sizeof([iota - 1]int{} == x)
38 _ = unsafe.Sizeof([iota - 2]int{} == y)
39 _ = unsafe.Sizeof([Two]int{} == x)
40 )
41 var z [iota]int
42 _ = unsafe.Sizeof([2]int{} == z)
43 })
44 three = iota
45 )
46
47 var _ [three]int = [3]int{}
48
49 func main() {
50
51 const (
52 _ = iota
53 _ = len([iota]byte{})
54 _ = unsafe.Sizeof(iota)
55 _ = unsafe.Sizeof(func() { _ = iota })
56 _ = unsafe.Sizeof(func() { var _ = iota })
57 _ = unsafe.Sizeof(func() { const _ = iota })
58 _ = unsafe.Sizeof(func() { type _ [iota]byte })
59 _ = unsafe.Sizeof(func() { func() int { return iota }() })
60 )
61
62 const (
63 zero = iota
64 one = iota
65 _ = unsafe.Sizeof(func() {
66 var x [iota]int
67 var y [iota]int
68 const (
69 Zero = iota
70 One
71 Two
72 _ = unsafe.Sizeof([iota - 1]int{} == x)
73 _ = unsafe.Sizeof([iota - 2]int{} == y)
74 _ = unsafe.Sizeof([Two]int{} == x)
75 )
76 var z [iota]int
77 _ = unsafe.Sizeof([2]int{} == z)
78 })
79 three = iota
80 )
81
82 var _ [three]int = [3]int{}
83 }
84
View as plain text