]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/gc: do not omit wrapper for expression (interface{...}).F
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 7 Jan 2014 12:26:48 +0000 (13:26 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 7 Jan 2014 12:26:48 +0000 (13:26 +0100)
Fixes #6723.

R=rsc
CC=golang-codereviews
https://golang.org/cl/41570047

src/cmd/gc/reflect.c
test/method4.dir/prog.go

index 4dde2176b19f31706ce92cb35c07ec2cb3733134..5afcdee48989da77b54147736172274b9eaeea91 100644 (file)
@@ -476,9 +476,8 @@ imethods(Type *t)
                        last->link = a;
                last = a;
 
-               // Compiler can only refer to wrappers for
-               // named interface types and non-blank methods.
-               if(t->sym == S || isblanksym(method))
+               // Compiler can only refer to wrappers for non-blank methods.
+               if(isblanksym(method))
                        continue;
 
                // NOTE(rsc): Perhaps an oversight that
index 77d580cffc51b69666912f1221a3967f20ba67b2..cb5cf65f2904f31ad2dd251cabaff24462f0cae9 100644 (file)
@@ -73,7 +73,14 @@ func main() {
        f4 := I2.Sum
        eq(f4(t1, a, 17), 27)
        eq(f4(t2, a, 18), 28)
-       
+
+       // issue 6723
+       f5 := (interface {
+               I2
+       }).Sum
+       eq(f5(t1, a, 19), 29)
+       eq(f5(t2, a, 20), 30)
+
        mt1 := method4a.T1(4)
        mt2 := &method4a.T2{4}