aboutsummaryrefslogtreecommitdiff
path: root/test/interface
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2020-12-03 14:00:19 -0800
committerMatthew Dempsky <mdempsky@google.com>2020-12-07 06:40:04 +0000
commitd90b199e9c3d6673b1951ddb6a78addd7e0dda26 (patch)
treeba94f0f562b4a5280bec1a03981e4947fea2162f /test/interface
parente885df2731cb36925c9a9de9cf1a34a167461cd7 (diff)
downloadgo-d90b199e9c3d6673b1951ddb6a78addd7e0dda26.tar.gz
go-d90b199e9c3d6673b1951ddb6a78addd7e0dda26.zip
[dev.regabi] cmd/compile: silence errors about missing blank methods
If an interface contains a blank method, that's already an error. No need for useless follow-up error messages about not implementing them. Fixes #42964. Change-Id: I5bf53a8f27d75d4c86c61588c5e2e3e95563d320 Reviewed-on: https://go-review.googlesource.com/c/go/+/275294 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'test/interface')
-rw-r--r--test/interface/explicit.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/interface/explicit.go b/test/interface/explicit.go
index 3f9451e8d2..b705b97676 100644
--- a/test/interface/explicit.go
+++ b/test/interface/explicit.go
@@ -100,6 +100,7 @@ type T2 struct{}
func (t *T2) M() {}
func (t *T2) _() {}
-// Check that nothing satisfies an interface with blank methods.
-var b1 B1 = &T2{} // ERROR "incompatible|missing _ method"
-var b2 B2 = &T2{} // ERROR "incompatible|missing _ method"
+// Already reported about the invalid blank interface method above;
+// no need to report about not implementing it.
+var b1 B1 = &T2{}
+var b2 B2 = &T2{}