mirror of
https://github.com/golang/go
synced 2024-11-18 23:05:06 -07:00
function wo return is an error - not warning
R=r OCL=15169 CL=15169
This commit is contained in:
parent
0ba1db7475
commit
ff65872fbf
@ -54,7 +54,7 @@ walk(Node *fn)
|
||||
}
|
||||
if(curfn->type->outtuple)
|
||||
if(walkret(curfn->nbody))
|
||||
warn("function ends without a return statement");
|
||||
yyerror("function ends without a return statement");
|
||||
walkstate(curfn->nbody);
|
||||
if(debug['W']) {
|
||||
snprint(s, sizeof(s), "after %S", curfn->nname->sym);
|
||||
|
Loading…
Reference in New Issue
Block a user