diff options
author | Russ Cox <rsc@golang.org> | 2010-02-01 23:58:49 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-02-01 23:58:49 -0800 |
commit | 92f8a9a9a2160def5a13a4e0dbbe9b84cdfd1f94 (patch) | |
tree | d95b6a53baa085a3b5ce8f1f4eb505fb52ab3ea0 /test/fixedbugs/bug251.go | |
parent | ae187db33bffd1ff8b8ee0cdd6c28c7ba9d35e28 (diff) | |
download | go-92f8a9a9a2160def5a13a4e0dbbe9b84cdfd1f94.tar.gz |
gc: bug250, bug251 - recursive interface types
Fixes issue 287.
R=ken2
CC=golang-dev
http://codereview.appspot.com/199057
Diffstat (limited to 'test/fixedbugs/bug251.go')
-rw-r--r-- | test/fixedbugs/bug251.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/fixedbugs/bug251.go b/test/fixedbugs/bug251.go new file mode 100644 index 000000000..1dc712fa7 --- /dev/null +++ b/test/fixedbugs/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" +} + +type I2 interface { + I1 +} + + +var i1 I1 = i2 +var i2 I2 +var i2a I2 = i1 |