github.com/prattmic/llgo-embedded@v0.0.0-20150820070356-41cfecea0e1e/test/llgoi/interfaces.test (about) 1 // RUN: llgoi < %s | FileCheck %s 2 3 import "errors" 4 err := errors.New("foo") 5 // CHECK: err error {{.*}} = foo 6 7 err.(interface{Foo()}) 8 // CHECK: panic: interface conversion 9 10 _, _ := err.(interface{Foo()}) 11 // CHECK: #0 interface{Foo()} (<nil>) = <nil> 12 // CHECK: #1 bool = false 13 14 err.(interface{Error() string}) 15 // CHECK: #0 interface{Error() string} {{.*}} = foo 16 17 _, _ := err.(interface{Error() string}) 18 // CHECK: #0 interface{Error() string} {{.*}} = foo 19 // CHECK: #1 bool = true