github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/test/fixedbugs/bug398.go (about)

     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  
     9  package p
    10  
    11  type I1 interface {
    12        F() interface{I1}
    13  }
    14  
    15  type I2 interface {
    16        F() interface{I2}
    17  }       
    18  
    19  var v1 I1
    20  var v2 I2
    21  
    22  func f() bool {
    23         return v1 == v2
    24  }