blob: 496c0be6100e3d9db59f5bd80d92852e5025d89d [file] [log] [blame]
Russ Cox2b1c9b42012-02-16 23:49:30 -05001// errorcheck
Ian Lance Taylor5261be22009-08-21 17:42:41 -07002
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
9type I1 interface { I2 } // ERROR "interface"
10type I2 int
11
12type I3 interface { int } // ERROR "interface"
Russ Cox28b655e2009-08-21 21:30:24 -070013
14type S struct {
15 x interface{ S } // ERROR "interface"
16}
Matthew Dempsky07de3462017-03-20 11:56:15 -070017type I4 interface { // GC_ERROR "invalid recursive type"
18 I4 // GCCGO_ERROR "interface"
Russ Cox28b655e2009-08-21 21:30:24 -070019}
20
Matthew Dempsky380ef6b2019-08-30 14:54:21 -070021type I5 interface { // GC_ERROR "invalid recursive type"
Ian Lance Taylor09977732010-08-31 14:12:23 -070022 I6 // GCCGO_ERROR "interface"
Russ Cox28b655e2009-08-21 21:30:24 -070023}
24
Matthew Dempsky380ef6b2019-08-30 14:54:21 -070025type I6 interface {
Matthew Dempsky07de3462017-03-20 11:56:15 -070026 I5 // GCCGO_ERROR "interface"
Russ Cox28b655e2009-08-21 21:30:24 -070027}