1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:34:40 -07:00

cmd/gc: remove "send used as value" hint

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
This commit is contained in:
Russ Cox 2013-09-06 15:47:52 -04:00
parent 3548ab5ebb
commit e1ac15743b

View File

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