1
0
mirror of https://github.com/golang/go synced 2024-11-21 17:44:40 -07:00
R=r
OCL=29479
CL=29479
This commit is contained in:
Ken Thompson 2009-05-27 18:37:02 -07:00
parent c4a74b0b4a
commit b3f303ec9a
3 changed files with 6 additions and 5 deletions

View File

@ -1945,8 +1945,13 @@ mkdotargs(Node *r, Node *rr, Iter *saver, Node *nn, Type *l, int fp)
st = typ(TSTRUCT); // generated structure
ft = T; // last field
while(r != N) {
if(r->op == OLITERAL && r->val.ctype == CTNIL) {
if(r->type == T || r->type->etype == TNIL) {
yyerror("inappropriate use of nil in ... argument");
return N;
}
}
defaultlit(r, T);
if(r->type == T) // type check failed
return N;

View File

@ -108,10 +108,6 @@ BUG: should crash
bugs/bug149.go:14: cannot convert []uint8 constant to string
BUG: should compile
=========== bugs/bug153.go
BUG: errchk: bugs/bug153.go:9: error message does not match 'nil'
bugs/bug153.go:9: fatal error: dowidth: unknown type: E-34
=========== fixedbugs/bug016.go
fixedbugs/bug016.go:7: constant -3 overflows uint