1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:47:58 -07:00

gc: more accurate error description

R=ken2
CC=golang-dev
https://golang.org/cl/1284041
This commit is contained in:
Russ Cox 2010-05-24 17:07:51 -07:00
parent 566f598046
commit ea941f09bf
3 changed files with 4 additions and 4 deletions

View File

@ -45,10 +45,10 @@ static struct {
"var declaration not allowed in for initializer", "var declaration not allowed in for initializer",
% loadsys package imports LVAR LNAME '[' ']' LNAME '{' % 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 '{' % 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 ';' % loadsys package imports LFUNC LNAME '(' ')' '{' LDEFER LNAME ';'
"argument to go/defer must be function call", "argument to go/defer must be function call",

View File

@ -7,4 +7,4 @@
package main package main
func 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"

View File

@ -6,5 +6,5 @@
package main 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"