Closed
Description
Found while experimenting with https://golang.org/cl/15522.
Empty field (_ struct{}
) takes space in Go 1.5, but not in Go 1.4
or any previous Go releases. See http://play.golang.org/p/OTr-GLz2UN.
$ go run OTr-GLz2UN.go # Go tip
16 24
16 16
12
$ go143 run OTr-GLz2UN.go
16 16
16 16
8
It's a compiler regression introduced by Go 1.5.
Tentatively labeled Go 1.5.2 as this can't be workaround.