]> Cypherpunks repositories - gostls13.git/commitdiff
bug167
authorRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 18:48:22 +0000 (11:48 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 18:48:22 +0000 (11:48 -0700)
R=ken
OCL=31295
CL=31295

src/cmd/gc/dcl.c
src/cmd/ld/go.c
test/fixedbugs/bug167.go [moved from test/bugs/bug167.go with 100% similarity]
test/golden.out

index 73cf7786a72e309f85e863f12e019019115f4bb9..4a1dfa1c1b36eb43d260c7be0eafc01d7fb64efa 100644 (file)
@@ -104,7 +104,7 @@ void
 updatetype(Type *n, Type *t)
 {
        Sym *s;
-       int local;
+       int local, vargen;
        int maplineno, lno, etype;
 
        s = n->sym;
@@ -141,13 +141,14 @@ updatetype(Type *n, Type *t)
        // that is no longer associated with n.
        maplineno = n->maplineno;
        local = n->local;
+       vargen = n->vargen;
        *n = *t;
        n->sym = s;
        n->local = local;
        n->siggen = 0;
        n->printed = 0;
        n->method = nil;
-       n->vargen = 0;
+       n->vargen = vargen;
        n->nod = N;
 
        // catch declaration of incomplete type
index 54a8e48d1d8f5760be871fde96c2903de158235b..6c2cbc09bc7a5e0c26b6fc8990265dc9884ee0a3 100644 (file)
@@ -200,7 +200,7 @@ loadpkgdata(char *file, char *data, int len)
                } else if((ndef = forwardfix(x->def, def)) != nil) {
                        x->def = ndef;
                } else {
-                       fprint(2, "%d: conflicting definitions for %s\n", argv0, name);
+                       fprint(2, "%s: conflicting definitions for %s\n", argv0, name);
                        fprint(2, "%s:\t%s %s %s\n", x->file, x->prefix, name, x->def);
                        fprint(2, "%s:\t%s %s %s\n", file, prefix, name, def);
                        nerrors++;
similarity index 100%
rename from test/bugs/bug167.go
rename to test/fixedbugs/bug167.go
index 28083668a0c6a7fde7c16bec29daf374cd71c1b7..790e4311bf4c7ca85287f3df3cd857dc17a0a9c6 100644 (file)
@@ -105,12 +105,6 @@ BUG: bug159
 123
 BUG: should fail
 
-=========== bugs/bug167.go
-BUG: bug167
-1606416656: conflicting definitions for main.T·bug167
-bug167.6:      type main.T·bug167 struct { x int }
-bug167.6:      type main.T·bug167 struct { x float }
-
 =========== fixedbugs/bug016.go
 fixedbugs/bug016.go:7: constant -3 overflows uint