go/test/syntax
Robert Griesemer ffc0573b85 cmd/compile/internal/syntax: better error when an assignment is used in value context
The error message is now positioned at the statement position (which is
an identifing token, such as the '=' for assignments); and in case of
assignments it emphasizes the assignment by putting the Lhs and Rhs
in parentheses. Finally, the wording is changed from "use of * as value"
to the stronger "cannot use * as value" (for which there is precedent
elsewhere in the parser).

Fixes #36858.

Change-Id: Ic3f101bba50f58e3a1d9b29645066634631f2d61
Reviewed-on: https://go-review.googlesource.com/c/go/+/218337
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-02-21 22:57:52 +00:00
..
chan.go
chan1.go cmd/compile/internal/syntax: better error when an assignment is used in value context 2020-02-21 22:57:52 +00:00
composite.go
ddd.go
else.go
if.go
import.go
initvar.go cmd/compile/internal/syntax: generalize error about var decls in init clauses 2017-02-13 23:15:32 +00:00
interface.go
semi1.go cmd/compile/internal/parser: improved syntax error for incorrect if/for/switch header 2017-02-09 03:54:47 +00:00
semi2.go
semi3.go cmd/compile/internal/parser: improved syntax error for incorrect if/for/switch header 2017-02-09 03:54:47 +00:00
semi4.go cmd/compile/internal/parser: improved a couple of error messages 2017-02-24 18:54:36 +00:00
semi5.go
semi6.go cmd/compile/internal/syntax: differentiate between ';' and '\n' in syntax errors 2017-02-09 01:45:17 +00:00
semi7.go
topexpr.go
typesw.go cmd/compile/internal/syntax: better error when an assignment is used in value context 2020-02-21 22:57:52 +00:00
vareq.go
vareq1.go