]> Cypherpunks repositories - gostls13.git/commitdiff
gc: fix method expression bug
authorRuss Cox <rsc@golang.org>
Tue, 9 Feb 2010 05:40:35 +0000 (21:40 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 9 Feb 2010 05:40:35 +0000 (21:40 -0800)
R=ken2
CC=golang-dev
https://golang.org/cl/206043

src/cmd/gc/typecheck.c

index 0643f77a953554322ae4b22f17f6447c5fc2b3c0..11d142eebb5fae18ccd7d6b3fe2416acc6830943 100644 (file)
@@ -481,6 +481,7 @@ reswitch:
                        n->op = ONAME;
                        n->sym = methodsym(sym, l->type);
                        n->type = methodfunc(n->type, 1);
+                       n->xoffset = 0;
                        getinargx(n->type)->type->type = l->type;       // fix up receiver
                        n->class = PFUNC;
                        ok = Erv;