mirror of
https://github.com/golang/go.git
synced 2024-09-22 10:58:58 +00: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(curfn->type->outtuple)
|
||||||
if(walkret(curfn->nbody))
|
if(walkret(curfn->nbody))
|
||||||
warn("function ends without a return statement");
|
yyerror("function ends without a return statement");
|
||||||
walkstate(curfn->nbody);
|
walkstate(curfn->nbody);
|
||||||
if(debug['W']) {
|
if(debug['W']) {
|
||||||
snprint(s, sizeof(s), "after %S", curfn->nname->sym);
|
snprint(s, sizeof(s), "after %S", curfn->nname->sym);
|
||||||
|
Loading…
Reference in New Issue
Block a user