Commit 5b129cda authored by Russ Cox's avatar Russ Cox

assignment count mismatch: 2 = 1.

R=ken
OCL=23534
CL=23534
parent f1fe21a0
......@@ -185,6 +185,7 @@ struct Node
uchar iota; // OLITERAL made from iota
uchar embedded; // ODCLFIELD embedded type
uchar colas; // OAS resulting from :=
uchar diag; // already printed error about this
// most nodes
Node* left;
......
......@@ -534,8 +534,10 @@ loop:
}
break;
}
yyerror("bad shape across assignment - cr=%d cl=%d\n", cr, cl);
if(l->diag == 0) {
l->diag = 1;
yyerror("assignment count mismatch: %d = %d", cl, cr);
}
goto ret;
case OBREAK:
......@@ -3083,7 +3085,10 @@ multi:
return n;
badt:
yyerror("shape error across :=");
if(nl->diag == 0) {
nl->diag = 1;
yyerror("assignment count mismatch: %d = %d", cl, cr);
}
return nl;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment