Re: [go-nuts] const struct

2017-09-07 Thread Jesse McNelis
On Fri, Sep 8, 2017 at 2:52 PM, DrGo wrote: > Sorry if this was asked before, but I could not find any relevant posts. > > Any reason why this struct literal (made up of fields that can be declared > const) is not allowed? https://golang.org/ref/spec#Constants describes what types of values can b

[go-nuts] const struct

2017-09-07 Thread DrGo
Sorry if this was asked before, but I could not find any relevant posts. Any reason why this struct literal (made up of fields that can be declared const) is not allowed? const UnknownPos = scanner.Position{"", -1, -1, -1} error: const initializer scanner.Position literal is not a constant. Cu