cuelang.org/go@v0.10.1/cue/testdata/resolve/022_list_unification.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: list unification 4 #evalPartial 5 -- in.cue -- 6 a: {l: ["foo", v], v: l[1]} 7 b: a & {l: [_, "bar"]} 8 -- out/def -- 9 a: { 10 l: ["foo", v] 11 v: l[1] 12 } 13 b: a & { 14 l: [_, "bar"] 15 } 16 -- out/legacy-debug -- 17 <0>{a: <1>{l: ["foo",<2>.v], v: <2>.l[1]}, b: <3>{l: ["foo","bar"], v: "bar"}} 18 -- out/compile -- 19 --- in.cue 20 { 21 a: { 22 l: [ 23 "foo", 24 〈1;v〉, 25 ] 26 v: 〈0;l〉[1] 27 } 28 b: (〈0;a〉 & { 29 l: [ 30 _, 31 "bar", 32 ] 33 }) 34 } 35 -- out/eval/stats -- 36 Leaks: 0 37 Freed: 11 38 Reused: 6 39 Allocs: 5 40 Retain: 2 41 42 Unifications: 11 43 Conjuncts: 20 44 Disjuncts: 13 45 -- out/eval -- 46 (struct){ 47 a: (struct){ 48 l: (#list){ 49 0: (string){ "foo" } 50 1: (_){ _ } 51 } 52 v: (_){ _ } 53 } 54 b: (struct){ 55 l: (#list){ 56 0: (string){ "foo" } 57 1: (string){ "bar" } 58 } 59 v: (string){ "bar" } 60 } 61 }