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 ...@@ -185,6 +185,7 @@ struct Node
uchar iota; // OLITERAL made from iota uchar iota; // OLITERAL made from iota
uchar embedded; // ODCLFIELD embedded type uchar embedded; // ODCLFIELD embedded type
uchar colas; // OAS resulting from := uchar colas; // OAS resulting from :=
uchar diag; // already printed error about this
// most nodes // most nodes
Node* left; Node* left;
......
...@@ -534,8 +534,10 @@ loop: ...@@ -534,8 +534,10 @@ loop:
} }
break; break;
} }
if(l->diag == 0) {
yyerror("bad shape across assignment - cr=%d cl=%d\n", cr, cl); l->diag = 1;
yyerror("assignment count mismatch: %d = %d", cl, cr);
}
goto ret; goto ret;
case OBREAK: case OBREAK:
...@@ -3083,7 +3085,10 @@ multi: ...@@ -3083,7 +3085,10 @@ multi:
return n; return n;
badt: badt:
yyerror("shape error across :="); if(nl->diag == 0) {
nl->diag = 1;
yyerror("assignment count mismatch: %d = %d", cl, cr);
}
return nl; 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