1//gofmt -s 2 3package P 4 5type T struct { 6 x, y int 7} 8 9var _ = [42]T{ 10 {}, 11 {1, 2}, 12 {3, 4}, 13} 14 15var _ = [...]T{ 16 {}, 17 {1, 2}, 18 {3, 4}, 19} 20 21var _ = []T{ 22 {}, 23 {1, 2}, 24 {3, 4}, 25} 26 27var _ = []T{ 28 {}, 29 10: {1, 2}, 30 20: {3, 4}, 31} 32 33var _ = []struct { 34 x, y int 35}{ 36 {}, 37 10: {1, 2}, 38 20: {3, 4}, 39} 40 41var _ = []interface{}{ 42 T{}, 43 10: T{1, 2}, 44 20: T{3, 4}, 45} 46 47var _ = [][]int{ 48 {}, 49 {1, 2}, 50 {3, 4}, 51} 52 53var _ = [][]int{ 54 ([]int{}), 55 ([]int{1, 2}), 56 {3, 4}, 57} 58 59var _ = [][][]int{ 60 {}, 61 { 62 {}, 63 {0, 1, 2, 3}, 64 {4, 5}, 65 }, 66} 67 68var _ = map[string]T{ 69 "foo": {}, 70 "bar": {1, 2}, 71 "bal": {3, 4}, 72} 73 74var _ = map[string]struct { 75 x, y int 76}{ 77 "foo": {}, 78 "bar": {1, 2}, 79 "bal": {3, 4}, 80} 81 82var _ = map[string]interface{}{ 83 "foo": T{}, 84 "bar": T{1, 2}, 85 "bal": T{3, 4}, 86} 87 88var _ = map[string][]int{ 89 "foo": {}, 90 "bar": {1, 2}, 91 "bal": {3, 4}, 92} 93 94var _ = map[string][]int{ 95 "foo": ([]int{}), 96 "bar": ([]int{1, 2}), 97 "bal": {3, 4}, 98} 99 100// from exp/4s/data.go 101var pieces4 = []Piece{ 102 {0, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil}, 103 {1, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil}, 104 {2, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil}, 105 {3, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil}, 106} 107 108var _ = [42]*T{ 109 {}, 110 {1, 2}, 111 {3, 4}, 112} 113 114var _ = [...]*T{ 115 {}, 116 {1, 2}, 117 {3, 4}, 118} 119 120var _ = []*T{ 121 {}, 122 {1, 2}, 123 {3, 4}, 124} 125 126var _ = []*T{ 127 {}, 128 10: {1, 2}, 129 20: {3, 4}, 130} 131 132var _ = []*struct { 133 x, y int 134}{ 135 {}, 136 10: {1, 2}, 137 20: {3, 4}, 138} 139 140var _ = []interface{}{ 141 &T{}, 142 10: &T{1, 2}, 143 20: &T{3, 4}, 144} 145 146var _ = []*[]int{ 147 {}, 148 {1, 2}, 149 {3, 4}, 150} 151 152var _ = []*[]int{ 153 (&[]int{}), 154 (&[]int{1, 2}), 155 {3, 4}, 156} 157 158var _ = []*[]*[]int{ 159 {}, 160 { 161 {}, 162 {0, 1, 2, 3}, 163 {4, 5}, 164 }, 165} 166 167var _ = map[string]*T{ 168 "foo": {}, 169 "bar": {1, 2}, 170 "bal": {3, 4}, 171} 172 173var _ = map[string]*struct { 174 x, y int 175}{ 176 "foo": {}, 177 "bar": {1, 2}, 178 "bal": {3, 4}, 179} 180 181var _ = map[string]interface{}{ 182 "foo": &T{}, 183 "bar": &T{1, 2}, 184 "bal": &T{3, 4}, 185} 186 187var _ = map[string]*[]int{ 188 "foo": {}, 189 "bar": {1, 2}, 190 "bal": {3, 4}, 191} 192 193var _ = map[string]*[]int{ 194 "foo": (&[]int{}), 195 "bar": (&[]int{1, 2}), 196 "bal": {3, 4}, 197} 198 199var pieces4 = []*Piece{ 200 {0, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil}, 201 {1, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil}, 202 {2, 0, Point{4, 1}, []Point{{0, 0}, {1, 0}, {1, 0}, {1, 0}}, nil, nil}, 203 {3, 0, Point{1, 4}, []Point{{0, 0}, {0, 1}, {0, 1}, {0, 1}}, nil, nil}, 204} 205