You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
typeAstruct {
F1intF2bool
}
funcmain() {
_=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.
A{B{},C{D{}}}
It would be helpful for the error message to specify the type name of the struct that wasn't initialized properly.
The text was updated successfully, but these errors were encountered:
griesemer
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Mar 23, 2022
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.
The text was updated successfully, but these errors were encountered: