cmd/compile: better error message for wrong-cased field name in composite literal #22794
Labels
FrozenDueToAge
help wanted
Soon
This needs action soon. (recent regressions, service outages, unusual time-sensitive situations)
I was just working on some program in a code base that uses the suffix
Id
for a field,but assigning from an struct from another codebase that uses
ID
instead.For example given https://play.golang.org/p/9FAMV7mLZE
on trying to compile it I get
Notice the nice hint on line 9
i1.Id undefined (type *it has no field or method Id, but does have ID)
it would be nice(though lengthy) to give a hint on line 14 such as
/cc compiler squad @mdempsky @griesemer @randall77 @rsc.
This is a super low priority issue that I can work on when free(or anyone else is welcome too), ideas and vetoes welcome.
The text was updated successfully, but these errors were encountered: