github.com/solo-io/cue@v0.4.7/cue/testdata/choosedefault/002_associativity_of_defaults.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: associativity of defaults 4 #evalFull 5 -- in.cue -- 6 a: *"a" | ("b" | "c") 7 b: (*"a" | "b") | "c" 8 c: *"a" | (*"b" | "c") 9 x: a & b 10 y: b & c 11 12 s1: *1 | ((*2|3) & (2|*3)) 13 s2: *1 | ((*2|3) & (*2|3)) 14 s3: *1 | ((*2|3) & 3) 15 s4: *1 | ((*2|3) & 2) 16 s5: *1 | *(*2 | 3) 17 18 -- out/def -- 19 x: a & b 20 y: b & c 21 a: *"a" | "b" | "c" 22 b: *"a" | "b" | "c" 23 c: *"a" | *"b" | "c" 24 -- out/legacy-debug -- 25 <0>{x: "a", y: (*"a" | *"b"), a: "a", b: "a", c: (*"a" | *"b")} 26 -- out/compile -- 27 --- in.cue 28 { 29 a: (*"a"|("b"|"c")) 30 b: ((*"a"|"b")|"c") 31 c: (*"a"|(*"b"|"c")) 32 x: (〈0;a〉 & 〈0;b〉) 33 y: (〈0;b〉 & 〈0;c〉) 34 s1: (*1|((*2|3) & (2|*3))) 35 s2: (*1|((*2|3) & (*2|3))) 36 s3: (*1|((*2|3) & 3)) 37 s4: (*1|((*2|3) & 2)) 38 s5: (*1|*(*2|3)) 39 } 40 -- out/eval -- 41 (struct){ 42 a: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } 43 b: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } 44 c: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } 45 x: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } 46 y: (string){ |(*(string){ "a" }, (string){ "b" }, (string){ "c" }) } 47 s1: (int){ |(*(int){ 1 }, (int){ 2 }, (int){ 3 }) } 48 s2: (int){ |(*(int){ 1 }, (int){ 2 }, (int){ 3 }) } 49 s3: (int){ |(*(int){ 1 }, (int){ 3 }) } 50 s4: (int){ |(*(int){ 1 }, (int){ 2 }) } 51 s5: (int){ |(*(int){ 1 }, *(int){ 2 }, (int){ 3 }) } 52 }