3 // Copyright 2014 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 // Issue 8385: provide a more descriptive error when a method expression
8 // is called without a receiver.
12 type Fooer interface {
30 Fooer.Foo(5, 6) // ERROR "not enough arguments in call to method expression Fooer.Foo|incompatible type|not enough arguments"
35 g()() // ERROR "not enough arguments in call to g\(\)|not enough arguments"
36 f() // ERROR "not enough arguments in call to f|not enough arguments"
37 i.M() // ERROR "not enough arguments in call to i\.M|not enough arguments"
38 I.M() // ERROR "not enough arguments in call to method expression I\.M|not enough arguments"
39 t.M() // ERROR "not enough arguments in call to t\.M|not enough arguments"
40 T.M() // ERROR "not enough arguments in call to method expression T\.M|not enough arguments"
41 (*T).M() // ERROR "not enough arguments in call to method expression \(\*T\)\.M|not enough arguments"