mirror of
https://github.com/golang/go
synced 2024-11-20 11:04:56 -07:00
fix indirect error
x.go:3: invalid indirect of X (type int) was x.go:3: invalid indirect of nil R=ken OCL=33008 CL=33008
This commit is contained in:
parent
0dbd8971a2
commit
7732f79daa
@ -1215,7 +1215,9 @@ Nconv(Fmt *fp)
|
||||
}
|
||||
|
||||
if(fp->flags & FmtSign) {
|
||||
if(n->type == T || n->type->etype == TNIL)
|
||||
if(n->type == T)
|
||||
fmtprint(fp, "%#N", n);
|
||||
else if(n->type->etype == TNIL)
|
||||
fmtprint(fp, "nil");
|
||||
else
|
||||
fmtprint(fp, "%#N (type %T)", n, n->type);
|
||||
|
@ -221,7 +221,7 @@ reswitch:
|
||||
goto ret;
|
||||
}
|
||||
if(!isptr[t->etype]) {
|
||||
yyerror("invalid indirect of %+N", n);
|
||||
yyerror("invalid indirect of %+N", n->left);
|
||||
goto error;
|
||||
}
|
||||
ok |= Erv;
|
||||
|
Loading…
Reference in New Issue
Block a user