]> Cypherpunks repositories - gostls13.git/commitdiff
gc: allow ... in method lists
authorRuss Cox <rsc@golang.org>
Wed, 16 Dec 2009 00:20:37 +0000 (16:20 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 16 Dec 2009 00:20:37 +0000 (16:20 -0800)
R=ken2
https://golang.org/cl/179070

src/cmd/gc/go.y
test/fixedbugs/bug232.go [new file with mode: 0644]

index a8b921db5a23f756387fff5f0cd34f7f65a3dbd9..6d86a6a99fa94262108917a2167d954aecbefbed 100644 (file)
@@ -1285,7 +1285,7 @@ indcl:
        '(' oarg_type_list_ocomma ')' fnres
        {
                // without func keyword
-               $2 = checkarglist($2, 0);
+               $2 = checkarglist($2, 1);
                $$ = nod(OTFUNC, fakethis(), N);
                $$->list = $2;
                $$->rlist = $4;
diff --git a/test/fixedbugs/bug232.go b/test/fixedbugs/bug232.go
new file mode 100644 (file)
index 0000000..c0b8eb6
--- /dev/null
@@ -0,0 +1,8 @@
+// $G $D/$F.go
+
+// Copyright 2009 The Go Authors.  All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+type I interface { X(...) }