3 // Copyright 2017 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test forms of method expressions T.m where T is
21 func (S) m() { got += " m()" }
22 func (S) m1(s string) { got += " m1(" + s + ")" }
26 func (T) m2() { got += " m2()" }
29 // method expressions with named receiver types
36 // method expressions with literal receiver types
37 f := interface{ m1(string) }.m1
41 interface{ m1(string) }.m1(S{}, "c")
45 interface{ m1(string) }.m1(x, "d")
53 panic("got" + got + ", want" + want)