aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-06-03 20:38:20 -0700
committerKeith Randall <khr@golang.org>2020-06-04 06:21:55 +0000
commitf72d7cfc8fb5326c37e47414f388562460abae56 (patch)
tree490f604ecdf34bfcde3d781251a74488c6d288bf /test
parentbdf76ca045c989bcff9a0111819559d632a4a39a (diff)
downloadgo-f72d7cfc8fb5326c37e47414f388562460abae56.tar.gz
go-f72d7cfc8fb5326c37e47414f388562460abae56.zip
cmd/compile: add interface equality tests
Add interfaces which differ in type. Those used so far only differ in value, not type. These additional tests are needed to generate a failure before CL 236278 went in. Update #8606 Change-Id: Icdb7647b1973c2fff7e5afe2bd8b8c1b384f583e Reviewed-on: https://go-review.googlesource.com/c/go/+/236418 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/fixedbugs/issue8606.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/fixedbugs/issue8606.go b/test/fixedbugs/issue8606.go
index 676c06c0b29..8122b1d2b65 100644
--- a/test/fixedbugs/issue8606.go
+++ b/test/fixedbugs/issue8606.go
@@ -22,6 +22,10 @@ func main() {
{true, A{[]byte{1}, 1}, A{[]byte{1}, 2}},
{false, S{1, []byte{1}}, S{2, []byte{1}}},
{true, S{[]byte{1}, 1}, S{[]byte{1}, 2}},
+ {false, A{1, []byte{1}}, A{"2", []byte{1}}},
+ {true, A{[]byte{1}, 1}, A{[]byte{1}, "2"}},
+ {false, S{1, []byte{1}}, S{"2", []byte{1}}},
+ {true, S{[]byte{1}, 1}, S{[]byte{1}, "2"}},
} {
f := func() {
if test.a == test.b {