]> Cypherpunks repositories - gostls13.git/commitdiff
gc: remove interim ... error which rejects valid code.
authorIan Lance Taylor <iant@golang.org>
Sat, 26 Mar 2011 01:31:55 +0000 (18:31 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 26 Mar 2011 01:31:55 +0000 (18:31 -0700)
It's been six months.

R=rsc
CC=golang-dev
https://golang.org/cl/4289073

src/cmd/gc/typecheck.c
test/fixedbugs/bug252.go

index b4fd55f5df115912ab6041538d6afeb8acb77f57..1cc5abd5c3c678bb1cc556c4143d873c41a2cc22 100644 (file)
@@ -1634,11 +1634,6 @@ typecheckaste(int op, Node *call, int isddd, Type *tstruct, NodeList *nl, char *
        for(tl=tstruct->type; tl; tl=tl->down) {
                t = tl->type;
                if(tl->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;
-                       }
                        if(isddd) {
                                if(nl == nil)
                                        goto notenough;
index 5615f84fa1dceabcff7a7cb3d8461d1e459cb105..a2c1dab9d39027d3982c2b67cfe59ad51f05e1a3 100644 (file)
@@ -7,9 +7,9 @@
 package main
 
 func f(args ...int) {
-       g(args) // ERROR "[.][.][.]"
+       g(args)
 }
 
 func g(args ...interface{}) {
-       f(args) // ERROR "[.][.][.]"
+       f(args) // ERROR "cannot use|incompatible"
 }