From: Rob Findley Date: Mon, 6 Jul 2020 20:45:46 +0000 (-0400) Subject: go/types: update test case to exercise mutually recursive interfaces X-Git-Tag: go1.16beta1~1236 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=494ec85d9fd6deea388c454dfd836d9f845f7153;p=gostls13.git go/types: update test case to exercise mutually recursive interfaces Due to a typo, this test case was not actually exercising the bug described in golang/go#33656. Update it to do so. Interestingly, the comparison is now valid (as it should be) -- I suspect #33656 is actually fixed. Fixes #33656 Change-Id: If50a917f6477d8eb4f82f5a2a96bf5d9123ff0d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/241263 Run-TryBot: Robert Findley TryBot-Result: Gobot Gobot Reviewed-by: Robert Griesemer --- diff --git a/src/go/types/testdata/cycles2.src b/src/go/types/testdata/cycles2.src index 5fd9e838b6..1a7f40ae4b 100644 --- a/src/go/types/testdata/cycles2.src +++ b/src/go/types/testdata/cycles2.src @@ -37,7 +37,7 @@ type A interface { } type B interface { - a() interface { + b() interface { AB } } @@ -59,8 +59,7 @@ var y interface { B } -// TODO(gri) This should be a valid compare. See #33656. -var _ = x /* ERROR cannot compare */ == y +var _ = x == y // Test case for issue 6638.