diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-08 04:39:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-08 04:39:19 +0000 |
commit | b65b77cc80885f72f710da4134f05fc6b12fc8c5 (patch) | |
tree | 8e3610361be26c2dac6c5862abb45933735ee1fc /libgo/go | |
parent | d9b120ce89f7198d1a82727f54e0563321a2cba8 (diff) | |
download | gcc-b65b77cc80885f72f710da4134f05fc6b12fc8c5.zip gcc-b65b77cc80885f72f710da4134f05fc6b12fc8c5.tar.gz gcc-b65b77cc80885f72f710da4134f05fc6b12fc8c5.tar.bz2 |
reflect: correctly handle direct interface typed receiver in Value.call
A direct interface type's value method takes value receiver now.
Don't pass pointer to the method function.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175798
From-SVN: r271000
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/reflect/value.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/reflect/value.go b/libgo/go/reflect/value.go index d3a6243..298fbac 100644 --- a/libgo/go/reflect/value.go +++ b/libgo/go/reflect/value.go @@ -401,7 +401,7 @@ func (v Value) call(op string, in []Value) []Value { if v.flag&flagMethod != 0 { nin++ } - firstPointer := len(in) > 0 && t.In(0).Kind() != Ptr && v.flag&flagMethodFn != 0 + firstPointer := len(in) > 0 && ifaceIndir(t.In(0).common()) && v.flag&flagMethodFn != 0 params := make([]unsafe.Pointer, nin) off := 0 if v.flag&flagMethod != 0 { |