Sometimes we forget setlineno, and the error ends up on the wrong line, or it ends up on the right line but only because the global line number happens to be correct. Sometimes we do yyerrorl(n.Lineno instead, but that ignores the special handling found in setlineno; yyerrorl is really meant for use in the lexer, before we have a well-formed AST to work from. And the global line number will have to go away as part of #15756.
This issue is a reminder to myself to add yyerrorn that just wraps setlineno; Yyerror early in Go 1.8 and attempt to use it throughout the tree.
The text was updated successfully, but these errors were encountered: