1
0
mirror of https://github.com/golang/go synced 2024-11-21 15:44:44 -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;
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);