From ea941f09bf63c694e52632965750228dda9370ad Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 24 May 2010 17:07:51 -0700 Subject: [PATCH] gc: more accurate error description R=ken2 CC=golang-dev https://golang.org/cl/1284041 --- src/cmd/gc/go.errors | 4 ++-- test/syntax/vareq.go | 2 +- test/syntax/vareq1.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/gc/go.errors b/src/cmd/gc/go.errors index be11c74164..cdd7578d41 100644 --- a/src/cmd/gc/go.errors +++ b/src/cmd/gc/go.errors @@ -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", diff --git a/test/syntax/vareq.go b/test/syntax/vareq.go index ef15fe5cde..9be03c1d3b 100644 --- a/test/syntax/vareq.go +++ b/test/syntax/vareq.go @@ -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" diff --git a/test/syntax/vareq1.go b/test/syntax/vareq1.go index 4697d018f7..2d35b3ea04 100644 --- a/test/syntax/vareq1.go +++ b/test/syntax/vareq1.go @@ -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"