cmd/compile: incorrect column reported for invalid struct field names #24339
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
This does not concern go/parser; rather, this is the compiler. The error comes from
I also believe that this is working as intended, as the position of the key-value expression is the position of the colon token. There was an issue where @mdempsky suggested that, in the new syntax package, node positions shouldn't always be their start position. For example, in
Having said that, I can understand that the error concerns the field name, not the entire key-value expression. Perhaps the error in this case should use the position for the field, and not the entire key-value expression.
Also cc @griesemer.