]> Cypherpunks repositories - gostls13.git/commitdiff
test: restore fixedbugs/bug398.go to original version
authorgriesemer <gri@golang.org>
Thu, 18 May 2017 21:11:17 +0000 (14:11 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 18 May 2017 21:45:03 +0000 (21:45 +0000)
Cannot reproduce original problem. Compiler internals
have changed enough such that this appears to work now.

Restore original test (exported interfaces), but also
keep version of the test using non-exported interfaces.

Fixes #15596.

Change-Id: Idb32da80239963242bd5d1609343c80f19773b0c
Reviewed-on: https://go-review.googlesource.com/43622
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
test/fixedbugs/bug398.go

index 81bf33c37a6df15fc511b64e50993507e038bcf4..a1583bd7746cbd977f33b3790c52df53d486ae62 100644 (file)
@@ -5,16 +5,36 @@
 // license that can be found in the LICENSE file.
 
 // Used to crash compiler in interface type equality check.
+// (This test used to have problems - see #15596.)
 
 package p
 
+// exported interfaces
+
+type I1 interface {
+      F() interface{I1}
+}
+
+type I2 interface {
+      F() interface{I2}
+}
+
+var V1 I1
+var V2 I2
+
+func F() bool {
+       return V1 == V2
+}
+
+// non-exported interfaces
+
 type i1 interface {
       F() interface{i1}
 }
 
 type i2 interface {
       F() interface{i2}
-}       
+}
 
 var v1 i1
 var v2 i2
@@ -22,6 +42,3 @@ var v2 i2
 func f() bool {
        return v1 == v2
 }
-
-// TODO(gri) Change test to use exported interfaces.
-// See issue #15596 for details.
\ No newline at end of file