go/types, types2: fix bug in types2.MissingMethod
Because Checker.missingMethod also looks up methods matching matching case-folded names, when Checker.missingMethod returns an alternative method, that method does not automatically have the wrong type. It may be a method with a different name. Adjust types2.MissingMethod to check the alternative method name before reporting a wrong type. Add API test that verifies (now correct) behavior for this case. Ported the code also to go/types, though it was not a bug there yet because looking up with case-folding is not yet enabled. Change-Id: Iaa48808535c9265a9879338ea666c6c021e93a2b Reviewed-on: https://go-review.googlesource.com/c/go/+/382634 Trust: Robert Griesemer <gri@golang.org> Reviewed-by:Robert Findley <rfindley@google.com>
Loading
Please sign in to comment