mirror of
https://github.com/golang/go
synced 2024-11-22 17:35:19 -07:00
290e68b983
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 https://golang.org/cl/5555063
23 lines
465 B
Go
23 lines
465 B
Go
// 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
|
|
}
|
|
}
|