1
0
mirror of https://github.com/golang/go synced 2024-11-25 03:07:56 -07:00

gc: remove interim ... error which rejects valid code.

It's been six months.

R=rsc
CC=golang-dev
https://golang.org/cl/4289073
This commit is contained in:
Ian Lance Taylor 2011-03-25 18:31:55 -07:00
parent c3fa7305d1
commit 2795b13156
2 changed files with 2 additions and 7 deletions

View 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;

View 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"
}