Does this issue reproduce with the latest release?
Yes (tested on 1.18)
What did you do?
https://go.dev/play/p/2-Us-h1omW-
package main
type A struct {
F1 int
F2 bool
}
func main() {
_ = A{0}
}
What did you expect to see?
./prog.go:9:9: too few values in struct literal for A
What did you see instead?
./prog.go:9:9: too few values in struct literal
Although the error message has a line:column, I found it tedious to locate the struct that was not initialized properly when there was a lot of nested structs, i.e.
It would be helpful for the error message to specify the type name of the struct that wasn't initialized properly.
Does this issue reproduce with the latest release?
Yes (tested on 1.18)
What did you do?
https://go.dev/play/p/2-Us-h1omW-
What did you expect to see?
What did you see instead?
Although the error message has a line:column, I found it tedious to locate the struct that was not initialized properly when there was a lot of nested structs, i.e.
It would be helpful for the error message to specify the type name of the struct that wasn't initialized properly.