3 // Copyright 2009 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 // Verify that pointers and interface types cannot be method receivers.
18 func (p P
) val() int { return 1 } // ERROR "receiver.* pointer|invalid pointer or interface receiver"
19 func (p
*P1
) val() int { return 1 } // ERROR "receiver.* pointer|invalid pointer or interface receiver"
24 func (p I
) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
25 func (p
*I1
) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
31 var _
= (*Val
).val
// ERROR "method"
36 var _
= pv
.val() // ERROR "method"
37 var _
= pv
.val
// ERROR "method"