github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/test/execution/interfaces/embedded.go (about) 1 // RUN: llgo -o %t %s 2 // RUN: %t 2>&1 | FileCheck %s 3 4 // CHECK: A 5 // CHECK-NEXT: B 6 7 package main 8 9 type BI interface { 10 B() 11 } 12 13 type AI interface { 14 A() 15 BI 16 } 17 18 type S struct{} 19 20 func (s S) A() { 21 println("A") 22 } 23 24 func (s S) B() { 25 println("B") 26 } 27 28 func main() { 29 var ai AI = S{} 30 ai.A() 31 ai.B() 32 }