]> Cypherpunks repositories - gostls13.git/commitdiff
gc: good syntax error for defer func() {} - missing final ()
authorRuss Cox <rsc@golang.org>
Mon, 5 Apr 2010 06:27:26 +0000 (23:27 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 5 Apr 2010 06:27:26 +0000 (23:27 -0700)
R=ken2
CC=golang-dev
https://golang.org/cl/855044

src/cmd/gc/go.errors

index ddd4a6222694fc8be7919a04a1f27c1276a434b0..d5f23373860f48e666d3cc2f30bbc67c18db5ffc 100644 (file)
@@ -49,4 +49,8 @@ static struct {
 
        % loadsys package imports LFUNC LNAME '(' ')' '{' LVAR LNAME '[' ']' LNAME '{'
        "var declaration missing = before initial value",
+       
+       % loadsys package imports LFUNC LNAME '(' ')' '{' LDEFER LNAME ';'
+       "argument to go/defer must be function call",
+
 };