cuelang.org/go@v0.10.1/cue/testdata/resolve/033_top-level_definition_with_struct_and_disjunction.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: top-level definition with struct and disjunction 4 #evalPartial 5 -- in.cue -- 6 #def: { 7 Type: string 8 Text: string 9 Size: int 10 } 11 12 #def: { 13 Type: "B" 14 Size: 0 15 } | { 16 Type: "A" 17 Size: 1 18 } 19 -- out/def -- 20 #def: { 21 Size: 0 22 Type: "B" 23 Text: string 24 } | { 25 Size: 1 26 Type: "A" 27 Text: string 28 } 29 -- out/export -- 30 31 -- out/yaml -- 32 {} 33 -- out/json -- 34 {} 35 -- out/legacy-debug -- 36 <0>{#def: (<1>C{Size: (0 & int), Type: ("B" & string), Text: string} | <2>C{Size: (1 & int), Type: ("A" & string), Text: string})} 37 -- out/compile -- 38 --- in.cue 39 { 40 #def: { 41 Type: string 42 Text: string 43 Size: int 44 } 45 #def: ({ 46 Type: "B" 47 Size: 0 48 }|{ 49 Type: "A" 50 Size: 1 51 }) 52 } 53 -- out/eval/stats -- 54 Leaks: 0 55 Freed: 10 56 Reused: 5 57 Allocs: 5 58 Retain: 0 59 60 Unifications: 8 61 Conjuncts: 15 62 Disjuncts: 10 63 -- out/eval -- 64 (struct){ 65 #def: (#struct){ |((#struct){ 66 Type: (string){ "B" } 67 Text: (string){ string } 68 Size: (int){ 0 } 69 }, (#struct){ 70 Type: (string){ "A" } 71 Text: (string){ string } 72 Size: (int){ 1 } 73 }) } 74 }