github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/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  }