github.com/switchupcb/yaegi@v0.10.2/_test/interface49.go (about) 1 package main 2 3 type Descriptor interface { 4 ParentFile() FileDescriptor 5 } 6 7 type FileDescriptor interface { 8 Enums() EnumDescriptors 9 Services() ServiceDescriptors 10 } 11 12 type EnumDescriptors interface { 13 Get(i int) EnumDescriptor 14 } 15 16 type EnumDescriptor interface { 17 Values() EnumValueDescriptors 18 } 19 20 type EnumValueDescriptors interface { 21 Get(i int) EnumValueDescriptor 22 } 23 24 type EnumValueDescriptor interface { 25 Descriptor 26 } 27 28 type ServiceDescriptors interface { 29 Get(i int) ServiceDescriptor 30 } 31 32 type ServiceDescriptor interface { 33 Descriptor 34 isServiceDescriptor 35 } 36 37 type isServiceDescriptor interface{ ProtoType(ServiceDescriptor) } 38 39 func main() { 40 var d Descriptor 41 println(d == nil) 42 } 43 44 // Output: 45 // true