mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
gc: more accurate error description
R=ken2 CC=golang-dev https://golang.org/cl/1284041
This commit is contained in:
parent
566f598046
commit
ea941f09bf
3 changed files with 4 additions and 4 deletions
|
@ -45,10 +45,10 @@ static struct {
|
|||
"var declaration not allowed in for initializer",
|
||||
|
||||
% loadsys package imports LVAR LNAME '[' ']' LNAME '{'
|
||||
"var declaration missing = before initial value",
|
||||
"unexpected { at end of statement",
|
||||
|
||||
% loadsys package imports LFUNC LNAME '(' ')' '{' LVAR LNAME '[' ']' LNAME '{'
|
||||
"var declaration missing = before initial value",
|
||||
"unexpected { at end of statement",
|
||||
|
||||
% loadsys package imports LFUNC LNAME '(' ')' '{' LDEFER LNAME ';'
|
||||
"argument to go/defer must be function call",
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
package main
|
||||
|
||||
func main() {
|
||||
var x map[string]string{"a":"b"} // ERROR "var declaration missing ="
|
||||
var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement"
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
|
||||
package main
|
||||
|
||||
var x map[string]string{"a":"b"} // ERROR "var declaration missing ="
|
||||
var x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement"
|
||||
|
||||
|
|
Loading…
Reference in a new issue