summaryrefslogtreecommitdiff
path: root/test/bugs
diff options
context:
space:
mode:
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
+ }
+}