1// errorcheck 2 3// Copyright 2018 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. 6 7// Verify that error message reports _ambiguous_ method. 8 9package p 10 11type A struct{ 12 H int 13} 14 15func (A) F() {} 16func (A) G() {} 17 18type B struct{ 19 G int 20 H int 21} 22 23func (B) F() {} 24 25type C struct { 26 A 27 B 28} 29 30var _ = C.F // ERROR "ambiguous" 31var _ = C.G // ERROR "ambiguous" 32var _ = C.H // ERROR "ambiguous" 33var _ = C.I // ERROR "no method .*I.*|C.I undefined" 34