]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: remove "send used as value" hint
authorRuss Cox <rsc@golang.org>
Fri, 6 Sep 2013 19:47:52 +0000 (15:47 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 6 Sep 2013 19:47:52 +0000 (15:47 -0400)
This message was helpful for pre-Go 1 users updating to Go 1.
That time is past. Now the message is confusing because it
depends on knowing what pre-Go 1 looked like.

Update #4697.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13335051

src/cmd/gc/typecheck.c

index 9b5a784eb1ea04eed3e7d2145b574b5dabbb3139..e4dd467945faf55e3f33af8d389f58cd035b8ae8 100644 (file)
@@ -928,11 +928,7 @@ reswitch:
                goto ret;
 
        case OSEND:
-               if(top & Erv) {
-                       yyerror("send statement %N used as value; use select for non-blocking send", n);
-                       goto error;
-               }
-               ok |= Etop | Erv;
+               ok |= Etop;
                l = typecheck(&n->left, Erv);
                typecheck(&n->right, Erv);
                defaultlit(&n->left, T);