this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/core/adt: add tests for 3770

Issue #3770

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I3fd591afc05f8661140cfd1fcc44ec79f2030199
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211752
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+103 -22
+103 -22
cue/testdata/eval/counters.txtar
··· 67 67 } 68 68 } 69 69 } 70 + -- issue3770.cue -- 71 + issue3770: task: { 72 + m: { 73 + let t = ["x"] 74 + for m in t { 75 + (m): a: 1 76 + } 77 + x: b: 1 78 + } 79 + m: null | { } 80 + out: m.x.a 81 + } 70 82 -- out/compile -- 71 83 --- issue3750.cue 72 84 { ··· 117 129 } 118 130 } 119 131 } 132 + --- issue3770.cue 133 + { 134 + issue3770: { 135 + task: { 136 + m: { 137 + let t#1 = [ 138 + "x", 139 + ] 140 + for _, m in 〈0;let t#1〉 { 141 + 〈1;m〉: { 142 + a: 1 143 + } 144 + } 145 + x: { 146 + b: 1 147 + } 148 + } 149 + m: (null|{}) 150 + out: 〈0;m〉.x.a 151 + } 152 + } 153 + } 120 154 --- issue3780.cue 121 155 { 122 156 issue3780: { ··· 163 197 } 164 198 } 165 199 -- out/evalalpha/stats -- 166 - Leaks: 205 200 + Leaks: 225 167 201 Freed: 0 168 202 Reused: 0 169 - Allocs: 205 203 + Allocs: 225 170 204 Retain: 0 171 205 172 - Unifications: 161 173 - Conjuncts: 240 174 - Disjuncts: 32 206 + Unifications: 172 207 + Conjuncts: 257 208 + Disjuncts: 34 175 209 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- 176 210 diff old new 177 211 --- old 178 212 +++ new 179 213 @@ -1,9 +1,9 @@ 180 214 -Leaks: 0 181 - -Freed: 137 182 - -Reused: 124 215 + -Freed: 151 216 + -Reused: 138 183 217 -Allocs: 13 184 - -Retain: 34 185 - +Leaks: 205 218 + -Retain: 35 219 + +Leaks: 225 186 220 +Freed: 0 187 221 +Reused: 0 188 - +Allocs: 205 222 + +Allocs: 225 189 223 +Retain: 0 190 224 191 - -Unifications: 113 192 - -Conjuncts: 209 193 - -Disjuncts: 171 194 - +Unifications: 161 195 - +Conjuncts: 240 196 - +Disjuncts: 32 225 + -Unifications: 125 226 + -Conjuncts: 229 227 + -Disjuncts: 186 228 + +Unifications: 172 229 + +Conjuncts: 257 230 + +Disjuncts: 34 197 231 -- out/eval/stats -- 198 232 Leaks: 0 199 - Freed: 137 200 - Reused: 124 233 + Freed: 151 234 + Reused: 138 201 235 Allocs: 13 202 - Retain: 34 236 + Retain: 35 203 237 204 - Unifications: 113 205 - Conjuncts: 209 206 - Disjuncts: 171 238 + Unifications: 125 239 + Conjuncts: 229 240 + Disjuncts: 186 207 241 -- out/evalalpha -- 208 242 (struct){ 209 243 issue3750: (struct){ ··· 315 349 a: (struct){ 316 350 b: (_){ _ } 317 351 } 352 + } 353 + } 354 + } 355 + issue3770: (struct){ 356 + task: (struct){ 357 + m: (struct){ 358 + let t#1 = (#list){ 359 + 0: (string){ "x" } 360 + } 361 + x: (struct){ 362 + b: (int){ 1 } 363 + } 364 + } 365 + out: (_|_){ 366 + // [incomplete] issue3770.task.out: undefined field: a: 367 + // ./issue3770.cue:10:11 318 368 } 319 369 } 320 370 } ··· 451 501 a: (struct){ 452 502 b: (_){ _ } 453 503 } 504 + @@ -95,10 +119,12 @@ 505 + } 506 + x: (struct){ 507 + b: (int){ 1 } 508 + - a: (int){ 1 } 509 + - } 510 + - } 511 + - out: (int){ 1 } 512 + + } 513 + + } 514 + + out: (_|_){ 515 + + // [incomplete] issue3770.task.out: undefined field: a: 516 + + // ./issue3770.cue:10:11 517 + + } 518 + } 519 + } 520 + issue3780: (struct){ 454 521 -- out/eval -- 455 522 (struct){ 456 523 issue3750: (struct){ ··· 539 606 b: (_){ _ } 540 607 } 541 608 } 609 + } 610 + } 611 + issue3770: (struct){ 612 + task: (struct){ 613 + m: (struct){ 614 + let t#1 = (#list){ 615 + 0: (string){ "x" } 616 + } 617 + x: (struct){ 618 + b: (int){ 1 } 619 + a: (int){ 1 } 620 + } 621 + } 622 + out: (int){ 1 } 542 623 } 543 624 } 544 625 issue3780: (struct){