2012-02-16 23:49:59 -05:00
|
|
|
// errorcheck
|
2010-02-01 23:58:49 -08:00
|
|
|
|
2016-04-10 14:32:26 -07:00
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
2010-02-01 23:58:49 -08:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
2017-03-20 11:56:15 -07:00
|
|
|
type I1 interface { // GC_ERROR "invalid recursive type"
|
2010-02-01 23:58:49 -08:00
|
|
|
m() I2
|
2017-03-20 11:56:15 -07:00
|
|
|
// TODO(mdempsky): The duplicate method error is silly
|
|
|
|
|
// and redundant, but tricky to prevent as it's actually
|
|
|
|
|
// being emitted against the underlying interface type
|
|
|
|
|
// literal, not I1 itself.
|
|
|
|
|
I2 // ERROR "loop|interface|duplicate method m"
|
2010-02-01 23:58:49 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type I2 interface {
|
2017-03-20 11:56:15 -07:00
|
|
|
I1 // GCCGO_ERROR "loop|interface"
|
2010-02-01 23:58:49 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2011-11-07 21:35:13 +01:00
|
|
|
var i1 I1 = i2
|
2010-02-01 23:58:49 -08:00
|
|
|
var i2 I2
|
|
|
|
|
var i2a I2 = i1
|