Commit 3081f817 authored by Keith Randall's avatar Keith Randall
Browse files

cmd/compile: always remove receiver type from instantiated method values

If a type T has a method foo, then

var t T
var i interface{} = t.foo

The type of foo is a method type, but the type of t.foo should be a
standard function type. Make sure we always do that conversion.

Fixes #47775

Change-Id: I464ec792196b050aba1914e070a4ede34bfd0bfa
Reviewed-on: https://go-review.googlesource.com/c/go/+/343881


Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarDan Scales <danscales@google.com>
parent 8486ced8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment