summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-09-30 15:05:01 -0400
committerRuss Cox <rsc@golang.org>2010-09-30 15:05:01 -0400
commit7feb3342eb41603c5d23d73e802a433ef937c900 (patch)
tree57e57372a2b96a178d523e68037b393fd38df598 /src/cmd
parent84bdf6fe0bc0401ce417771458ed54ed5542d143 (diff)
downloadgo-7feb3342eb41603c5d23d73e802a433ef937c900.tar.gz
gc: bug308
confused by using isddd for both ONAME and OCALL Fixes issue 1136. R=ken2 CC=golang-dev http://codereview.appspot.com/2314043
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/gc/typecheck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c
index 83c5ff72b..10cab14a1 100644
--- a/src/cmd/gc/typecheck.c
+++ b/src/cmd/gc/typecheck.c
@@ -1550,7 +1550,7 @@ typecheckaste(int op, int isddd, Type *tstruct, NodeList *nl, char *desc)
for(tl=tstruct->type; tl; tl=tl->down) {
t = tl->type;
if(tl->isddd) {
- if(nl != nil && nl->n->isddd && !isddd) {
+ if(nl != nil && nl->n->op == ONAME && nl->n->isddd && !isddd) {
// TODO(rsc): This is not actually illegal, but it will help catch bugs.
yyerror("to pass '%#N' as ...%T, use '%#N...'", nl->n, t->type, nl->n);
isddd = 1;