Commit ea941f09 authored by Russ Cox's avatar Russ Cox

gc: more accurate error description

R=ken2
CC=golang-dev
https://golang.org/cl/1284041
parent 566f5980
...@@ -45,10 +45,10 @@ static struct { ...@@ -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",
......
...@@ -7,4 +7,4 @@ ...@@ -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"
...@@ -6,5 +6,5 @@ ...@@ -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"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment