summaryrefslogtreecommitdiff
path: root/test/bugs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-01-20 17:14:09 -0500
committerRuss Cox <rsc@golang.org>2012-01-20 17:14:09 -0500
commitb2e8f1e4bf94e9a55b59fb5bb378f99070ec6464 (patch)
treecccd1dc2aaa00e596fe437422a0bd02bc7da452c /test/bugs
parent338d82993d167633484dac5d168e01458b26e8aa (diff)
downloadgo-b2e8f1e4bf94e9a55b59fb5bb378f99070ec6464.tar.gz
gc: undo most of 'fix infinite recursion for embedded interfaces'
Preserve test. changeset: 11593:f1deaf35e1d1 user: Luuk van Dijk <lvd@golang.org> date: Tue Jan 17 10:00:57 2012 +0100 summary: gc: fix infinite recursion for embedded interfaces This is causing 'interface type loop' errors during compilation of a complex program. I don't understand what's happening well enough to boil it down to a simple test case, but undoing this change fixes the problem. The change being undone is fixing a corner case (uses of pointer to interface in an interface definition) that basically only comes up in erroneous Go programs. Let's not try to fix this again until after Go 1. Unfixes issue 1909. TBR=lvd CC=golang-dev http://codereview.appspot.com/5555063
Diffstat (limited to 'test/bugs')
-rw-r--r--test/bugs/bug395.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/bugs/bug395.go b/test/bugs/bug395.go
new file mode 100644
index 000000000..adf74497c
--- /dev/null
+++ b/test/bugs/bug395.go
@@ -0,0 +1,22 @@
+// echo bug395 is broken # takes 90+ seconds to break
+// # $G $D/$F.go || echo bug395
+
+// Copyright 2011 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.
+
+// Issue 1909
+// Would OOM due to exponential recursion on Foo's expanded methodset in nodefmt
+package test
+
+type Foo interface {
+ Bar() interface {
+ Foo
+ }
+ Baz() interface {
+ Foo
+ }
+ Bug() interface {
+ Foo
+ }
+}