cuelang.org/go@v0.13.0/cue/testdata/resolve/034_closing_structs.txtar (about) 1 #name: closing structs 2 #evalPartial 3 -- in.cue -- 4 op: {x: int} // {x: int} 5 ot: {x: int, ...} // {x: int, ...} 6 cp: close({x: int}) // closed({x: int}) 7 ct: close({x: int, ...}) // {x: int, ...} 8 9 opot: op & ot // {x: int, ...} 10 otop: ot & op // {x: int, ...} 11 opcp: op & cp // closed({x: int}) 12 cpop: cp & op // closed({x: int}) 13 opct: op & ct // {x: int, ...} 14 ctop: ct & op // {x: int, ...} 15 otcp: ot & cp // closed({x: int}) 16 cpot: cp & ot // closed({x: int}) 17 otct: ot & ct // {x: int, ...} 18 ctot: ct & ot // {x: int, ...} 19 cpct: cp & ct // closed({x: int}) 20 ctcp: ct & cp // closed({x: int}) 21 ctct: ct & ct // {x: int, ...} 22 -- out/def -- 23 op: { 24 x: int 25 } 26 ot: { 27 x: int 28 ... 29 } 30 cp: close({ 31 x: int 32 }) 33 ct: { 34 x: int 35 ... 36 } 37 opot: op & ot 38 otop: ot & op 39 opcp: op & cp 40 cpop: cp & op 41 opct: op & ct 42 ctop: ct & op 43 otcp: ot & cp 44 cpot: cp & ot 45 otct: ot & ct 46 ctot: ct & ot 47 cpct: cp & ct 48 ctcp: ct & cp 49 ctct: ct & ct 50 -- out/legacy-debug -- 51 <0>{op: <1>{x: int}, ot: <2>{x: int, ...}, cp: <3>C{x: int}, ct: <4>{x: int, ...}, opot: <5>{x: int, ...}, otop: <6>{x: int, ...}, opcp: <7>C{x: int}, cpop: <8>C{x: int}, opct: <9>{x: int, ...}, ctop: <10>{x: int, ...}, otcp: <11>C{x: int}, cpot: <12>C{x: int}, otct: <13>{x: int, ...}, ctot: <14>{x: int, ...}, cpct: <15>C{x: int}, ctcp: <16>C{x: int}, ctct: <17>{x: int, ...}} 52 -- out/eval/stats -- 53 Leaks: 15 54 Freed: 35 55 Reused: 32 56 Allocs: 18 57 Retain: 15 58 59 Unifications: 50 60 Conjuncts: 115 61 Disjuncts: 50 62 -- out/evalalpha -- 63 (struct){ 64 op: (struct){ 65 x: (int){ int } 66 } 67 ot: (struct){ 68 x: (int){ int } 69 } 70 cp: (#struct){ 71 x: (int){ int } 72 } 73 ct: (#struct){ 74 x: (int){ int } 75 } 76 opot: (struct){ 77 x: (int){ int } 78 } 79 otop: (struct){ 80 x: (int){ int } 81 } 82 opcp: (#struct){ 83 x: (int){ int } 84 } 85 cpop: (#struct){ 86 x: (int){ int } 87 } 88 opct: (#struct){ 89 x: (int){ int } 90 } 91 ctop: (#struct){ 92 x: (int){ int } 93 } 94 otcp: (#struct){ 95 x: (int){ int } 96 } 97 cpot: (#struct){ 98 x: (int){ int } 99 } 100 otct: (#struct){ 101 x: (int){ int } 102 } 103 ctot: (#struct){ 104 x: (int){ int } 105 } 106 cpct: (#struct){ 107 x: (int){ int } 108 } 109 ctcp: (#struct){ 110 x: (int){ int } 111 } 112 ctct: ~(ct) 113 } 114 -- diff/-out/evalalpha<==>+out/eval -- 115 diff old new 116 --- old 117 +++ new 118 @@ -47,7 +47,5 @@ 119 ctcp: (#struct){ 120 x: (int){ int } 121 } 122 - ctct: (#struct){ 123 - x: (int){ int } 124 - } 125 + ctct: ~(ct) 126 } 127 -- out/eval -- 128 (struct){ 129 op: (struct){ 130 x: (int){ int } 131 } 132 ot: (struct){ 133 x: (int){ int } 134 } 135 cp: (#struct){ 136 x: (int){ int } 137 } 138 ct: (#struct){ 139 x: (int){ int } 140 } 141 opot: (struct){ 142 x: (int){ int } 143 } 144 otop: (struct){ 145 x: (int){ int } 146 } 147 opcp: (#struct){ 148 x: (int){ int } 149 } 150 cpop: (#struct){ 151 x: (int){ int } 152 } 153 opct: (#struct){ 154 x: (int){ int } 155 } 156 ctop: (#struct){ 157 x: (int){ int } 158 } 159 otcp: (#struct){ 160 x: (int){ int } 161 } 162 cpot: (#struct){ 163 x: (int){ int } 164 } 165 otct: (#struct){ 166 x: (int){ int } 167 } 168 ctot: (#struct){ 169 x: (int){ int } 170 } 171 cpct: (#struct){ 172 x: (int){ int } 173 } 174 ctcp: (#struct){ 175 x: (int){ int } 176 } 177 ctct: (#struct){ 178 x: (int){ int } 179 } 180 } 181 -- out/compile -- 182 --- in.cue 183 { 184 op: { 185 x: int 186 } 187 ot: { 188 x: int 189 ... 190 } 191 cp: close({ 192 x: int 193 }) 194 ct: close({ 195 x: int 196 ... 197 }) 198 opot: (〈0;op〉 & 〈0;ot〉) 199 otop: (〈0;ot〉 & 〈0;op〉) 200 opcp: (〈0;op〉 & 〈0;cp〉) 201 cpop: (〈0;cp〉 & 〈0;op〉) 202 opct: (〈0;op〉 & 〈0;ct〉) 203 ctop: (〈0;ct〉 & 〈0;op〉) 204 otcp: (〈0;ot〉 & 〈0;cp〉) 205 cpot: (〈0;cp〉 & 〈0;ot〉) 206 otct: (〈0;ot〉 & 〈0;ct〉) 207 ctot: (〈0;ct〉 & 〈0;ot〉) 208 cpct: (〈0;cp〉 & 〈0;ct〉) 209 ctcp: (〈0;ct〉 & 〈0;cp〉) 210 ctct: (〈0;ct〉 & 〈0;ct〉) 211 }