1// compile
2
3// Copyright 2012 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
7// Used to crash compiler in interface type equality check.
8// (This test used to have problems - see #15596.)
9
10package p
11
12// exported interfaces
13
14type I1 interface {
15      F() interface{I1}
16}
17
18type I2 interface {
19      F() interface{I2}
20}
21
22var V1 I1
23var V2 I2
24
25func F() bool {
26       return V1 == V2
27}
28
29// non-exported interfaces
30
31type i1 interface {
32      F() interface{i1}
33}
34
35type i2 interface {
36      F() interface{i2}
37}
38
39var v1 i1
40var v2 i2
41
42func f() bool {
43       return v1 == v2
44}
45