Commit f3039212 authored by Rémy Oudompheng's avatar Rémy Oudompheng

cmd/gc: do not omit wrapper for expression (interface{...}).F

Fixes #6723.

R=rsc
CC=golang-codereviews
https://golang.org/cl/41570047
parent 0a370023
...@@ -476,9 +476,8 @@ imethods(Type *t) ...@@ -476,9 +476,8 @@ imethods(Type *t)
last->link = a; last->link = a;
last = a; last = a;
// Compiler can only refer to wrappers for // Compiler can only refer to wrappers for non-blank methods.
// named interface types and non-blank methods. if(isblanksym(method))
if(t->sym == S || isblanksym(method))
continue; continue;
// NOTE(rsc): Perhaps an oversight that // NOTE(rsc): Perhaps an oversight that
......
...@@ -74,6 +74,13 @@ func main() { ...@@ -74,6 +74,13 @@ func main() {
eq(f4(t1, a, 17), 27) eq(f4(t1, a, 17), 27)
eq(f4(t2, a, 18), 28) 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) mt1 := method4a.T1(4)
mt2 := &method4a.T2{4} mt2 := &method4a.T2{4}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment