summaryrefslogtreecommitdiff
path: root/test/bugs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-16 17:44:15 -0800
committerRuss Cox <rsc@golang.org>2010-02-16 17:44:15 -0800
commitddf70a14a9cee2844e802385fa0b2aca38fc7276 (patch)
treeacd39b0d45037edc5f7cb5fcc05e164fe642f0b4 /test/bugs
parenta13a873d179c011086d449ce0f28ce63e1bcc5b8 (diff)
downloadgo-ddf70a14a9cee2844e802385fa0b2aca38fc7276.tar.gz
gc: undo attempt at fixing recursive interface embedding
Fixes issue 582. Update issue 287 Status: Accepted Bug fix was too intrusive; undo and reopen issue. R=ken2 CC=golang-dev http://codereview.appspot.com/209044
Diffstat (limited to 'test/bugs')
-rw-r--r--test/bugs/bug250.go19
-rw-r--r--test/bugs/bug251.go21
2 files changed, 40 insertions, 0 deletions
diff --git a/test/bugs/bug250.go b/test/bugs/bug250.go
new file mode 100644
index 000000000..cd28642bf
--- /dev/null
+++ b/test/bugs/bug250.go
@@ -0,0 +1,19 @@
+// $G $D/$F.go || echo BUG: bug250
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type I1 interface {
+ m() I2
+}
+
+type I2 interface {
+ I1
+}
+
+var i1 I1 = i2
+var i2 I2
+var i2a I2 = i1
diff --git a/test/bugs/bug251.go b/test/bugs/bug251.go
new file mode 100644
index 000000000..f6365f1e6
--- /dev/null
+++ b/test/bugs/bug251.go
@@ -0,0 +1,21 @@
+// errchk $G $D/$F.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type I1 interface {
+ m() I2
+ I2 // ERROR "loop|interface"
+}
+
+type I2 interface {
+ I1
+}
+
+
+var i1 I1 = i2
+var i2 I2
+var i2a I2 = i1