mirror of
https://github.com/golang/go
synced 2024-11-21 20:14:52 -07: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
@ -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 New Issue
Block a user