blob: 6e513279b5fae39d3e38012e7658c10d1536c14e [file] [log] [blame]
// Test for bad receiver names.
// Package foo ...
package foo
type foo struct{}
func (this foo) f1() { // MATCH /should be a reflection of its identity/
}
func (self foo) f2() { // MATCH /should be a reflection of its identity/
}
func (f foo) f3() {
}
func (foo) f4() {
}
type bar struct{}
func (b bar) f1() {
}
func (b bar) f2() {
}
func (a bar) f3() { // MATCH /receiver name a should be consistent with previous receiver name b for bar/
}
func (a *bar) f4() { // MATCH /receiver name a should be consistent with previous receiver name b for bar/
}
func (b *bar) f5() {
}
func (bar) f6() {
}
func (_ *bar) f7() { // MATCH /receiver name should not be an underscore/
}
type multiError struct{}
func (me multiError) f8() {
}
// Regression test for a panic caused by ill-formed receiver type.
func (recv []*x.y) f()