github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/test/execution/interfaces/e2i_conversion.go (about)

     1  // RUN: llgo -o %t %s
     2  // RUN: %t 2>&1 | count 0
     3  
     4  package main
     5  
     6  import "io"
     7  
     8  type rdr struct{}
     9  
    10  func (r rdr) Read(b []byte) (int, error) {
    11  	return 0, nil
    12  }
    13  
    14  func F(i interface{}) {
    15  	_ = i.(io.Reader)
    16  }
    17  
    18  func main() {
    19  	var r rdr
    20  	F(r)
    21  	F(&r)
    22  }