cuelang.org/go@v0.10.1/cue/testdata/comprehensions/pushdown.txtar (about) 1 # Working set of tests that unit test specifics of the aspect of the 2 # comprehension algorithm that pushes down evaluation to the arcs. 3 4 -- in.cue -- 5 linkChildren: { 6 w: 1 7 v: { 8 x: 1 9 if true { 10 y: 1 11 if true { 12 z: 1 13 14 rw: w 15 rx: x 16 ry: y 17 rz: z 18 19 n1a: na: [w, x, y, z] 20 n2a: n1a: na: [w, x, y, z] 21 n2z: n1z: nz: z 22 } 23 } 24 } 25 } 26 27 fail: { 28 a: { 29 // Condition of comprehensions must still hold after its evaluation. 30 // 31 // `b` is not defined, causing this if comprehension to evaluate to 32 // true. However, after inserting the corresponding result in curly 33 // braces, the condition would be true. This is not allowed. 34 if a.b == _|_ { 35 b: 1 36 } 37 } 38 } 39 40 embed: { 41 fail1: #C1 42 #C1: { 43 // TODO(errors): don't include all positions of p in the normal list of 44 // positions, or rather categorize the positions to show: 45 // 1) position of denied fields 46 // 2) position of structs that deny them 47 // 3) points at which those structs where mixed in (perhaps as tree) 48 // 4) conditionals that could enable allowing a field. 49 if false { 50 p: _ 51 } 52 } 53 fail1: p: "foo" // this should fail, as p is not present. 54 55 56 success2: #C2 57 #C2: { 58 if true { 59 p: _ 60 } 61 } 62 success2: p: "foo" // this succeeds as p is present. 63 64 success3: #C3 65 #C3: {} 66 success3: { 67 if false { 68 // p does not exist in success3, but it is okay, as it is not added. 69 p: q: 1 70 } 71 } 72 73 fail4: #C4 74 #C4: {} 75 fail4: { 76 if true { 77 // error as p is not allowed in fail4 78 p: q: 1 79 } 80 } 81 82 incomplete5: { 83 a: bool 84 if a { 85 p: q: 1 86 } 87 } 88 89 incomplete6: { 90 if false { 91 p: 1 92 } 93 p: q + 1 94 q: int 95 } 96 incomplete7: { 97 p: q + 1 98 q: int 99 if false { 100 q: 1 // do not inadvertently pick up a void arc. 101 } 102 } 103 } 104 105 // Mix of both dynamic and static fields. 106 mixedFieldsSuccess: { 107 a: { 108 for _, s in ["foo"] { 109 "\(s)": 1 110 X: 1 111 } 112 } 113 114 b: #Def: { 115 for _, s in ["foo"] { 116 "\(s)": 1 117 X: 1 118 } 119 } 120 b: x: b.#Def 121 b: x: X: _ 122 b: x: foo: _ 123 124 c: #Def: { 125 X: int 126 foo: int 127 } 128 c: x: c.#Def 129 c: x: { 130 for _, s in ["foo"] { 131 "\(s)": 1 132 X: 1 133 } 134 } 135 } 136 137 // fieldMismatch tests that an embedded scalar cannot be mixed with regular 138 // fields, even if they are added by a comprehension. 139 fieldMismatch: { 140 a: { 141 2 142 if true { 143 x: 3 144 } 145 } 146 } 147 148 // b12aStructCycle presents a case that can easily lead to stack overflow in 149 // a naive implementation. It corresponds to test b12a in structural.txtar. 150 noStackOverflowStructCycle: { 151 #list: { 152 tail: #list 153 154 if tail != null { 155 sum: tail.sum 156 } 157 } 158 159 list: { 160 tail: list 161 162 if tail != null { 163 sum: tail.sum 164 } 165 } 166 } 167 168 169 // #a is incomplete, but the missing values are provided by x. 170 provideIncompleteSuccess: { 171 t1: { 172 #a: { 173 if b { 174 c: 4 175 } 176 b: bool 177 } 178 x: (#a & {b: true}) & {c: 4} 179 y: x 180 } 181 182 t2: { 183 // c should be allowed 184 #a: { 185 if b { 186 c: 4 187 } 188 b: true 189 } 190 191 #c: {} 192 a: { 193 if b { 194 c: d: 4 195 } 196 b: true 197 // d is disallowed, even though it is added by embedding. 198 // TODO: this seems right, but it may be good to clarify why. 199 c: #c 200 } 201 } 202 } 203 204 // voidArcs tests that fields are dropped and reference up counts are adjusted 205 // appropriately under various rewrite scenario. 206 voidArcs: { 207 scopes: { 208 x: 1 209 a: { 210 y: 2 211 if true { 212 b: x 213 c: d: x 214 e: y 215 f: g: y 216 } 217 } 218 } 219 220 drop: { 221 x: 1 222 a: { 223 y: 2 224 if false { 225 b: x 226 c: d: x 227 e: y 228 f: g: y 229 } 230 } 231 } 232 } 233 234 cyclicError: { 235 a: { 236 x: bool 237 y: bool 238 if a.x { 239 y: true 240 } 241 if a.y { 242 x: true 243 } 244 b: {} 245 } 246 // The evaluation of `b` in `a` triggers a to be fully evaluated, which 247 // is not possible because the evaluation of `a` depends on incomplete 248 // values. 249 c: a.b 250 } 251 252 midwayReferences: { 253 a: { 254 for i, j in {a: 1, b: 2} { 255 x: y: z: (i): j 256 } 257 x: y: {} 258 } 259 b: a.x 260 c: a.x.y 261 d: a.x.y.z 262 } 263 264 // Ensure first closedness check is done after evaluation of 265 // comprehensions. 266 closedCheck: success1: { 267 a: b: [string]: #D 268 269 #D: { 270 d: string 271 if d != "c" { 272 e: string 273 } 274 } 275 276 a: b: c: { 277 d: "d" 278 e: "ok" 279 } 280 } 281 282 closedCheck: success2: { 283 a: b: [string]: #D 284 285 #D: { 286 d: string 287 if d != "c" { 288 ("foo"+"bar"): string 289 } 290 } 291 292 a: b: c: { 293 d: "d" 294 foobar: "ok" 295 } 296 } 297 298 closedCheck: success3: { 299 a: b: [string]: #D 300 301 #D: { 302 d: string 303 e: { 304 if d != "c" { 305 string 306 } 307 } 308 } 309 310 a: b: c: { 311 d: "d" 312 e: "ok" 313 } 314 } 315 316 emptyComprehensionIncomplete: { 317 a: {} 318 b: { 319 // b should be an incomplete error 320 if a.b { 321 } 322 } 323 } 324 325 // voidEliminationSuccess tests that "conditional" or "void" arcs are eliminated 326 // if their expression does not yield any result. 327 voidEliminationSuccess: t1: { 328 [string]: { 329 b: bool 330 if !b {} 331 } 332 if false { 333 a: b: true 334 } 335 } 336 337 voidEliminationSuccess: t2: { 338 components: { 339 sinks: [string]: #C & { 340 kind: string 341 configuration: { 342 if kind != "source" { 343 inputs: { 344 required: true 345 } 346 } 347 } 348 } 349 350 #C: { 351 kind: string 352 configuration: [string]: { 353 required: bool 354 if !required { 355 common: bool 356 } 357 } 358 } 359 } 360 361 components: sinks: blah: { 362 kind: "source" 363 } 364 } 365 366 voidEliminationSuccess: derefRef1: { 367 a: [string]: c: [string]: E 368 369 a: b: c: { 370 if false { 371 d: e: true // resolves 372 } 373 } 374 375 E: { 376 e: bool 377 f: !e // remains incomplete 378 } 379 } 380 381 voidEliminationSuccess: derefRef2: { 382 a: [string]: c: [string]: E 383 384 a: b: c: { 385 if false { 386 d: e: true // resolves 387 } 388 } 389 390 E: #F 391 #F: { 392 e: bool 393 f: !e // remains incomplete 394 } 395 } 396 397 voidEliminationSuccess: derefDisj1: { 398 a: [string]: c: [string]: E 399 400 a: b: c: { 401 if false { 402 d: e: true 403 } 404 } 405 406 E: { 407 e: bool 408 f: !e 409 } | { 410 g: bool 411 h: !g 412 } 413 } 414 415 voidEliminationSuccess: derefDisj2: { 416 a: [string]: c: [string]: E & E 417 418 a: b: c: { 419 if false { 420 d: e: true 421 } 422 } 423 424 E: { 425 e: bool 426 f: !e 427 } | { 428 g: bool 429 h: !g 430 } 431 } 432 433 voidEliminationSuccess: bulk1: { 434 a: b: {} 435 a: [string]: { 436 c: { 437 e: string 438 if false { 439 e: "" 440 } 441 } 442 d: c.e 443 } 444 } 445 446 voidEliminationSuccess: opt1: { 447 a: b: {} 448 a: b?: { 449 c: { 450 e: string 451 if false { 452 e: "" 453 } 454 } 455 d: c.e 456 } 457 } 458 459 voidEliminationSuccess: noCycle1: { 460 _x: a.b 461 a: { 462 c: h: "stream" 463 b: { 464 if c.g != _|_ {} 465 } 466 c: { 467 if false {g: _} 468 } 469 } 470 } 471 472 voidEliminationSuccess: noCycle2: { 473 a: { 474 c: h: "stream" 475 b: { 476 if c.g != _|_ {} 477 } 478 c: { 479 if false {g: _} 480 } 481 } 482 _x: a.b 483 } 484 485 voidLookup: { 486 a: x: z: a.y.z.void 487 488 a: y: { 489 c: _ 490 z: {} 491 } 492 493 a: [string]: { 494 c: { 495 for k, v in z { 496 (k): null // don't add this arc anywhere 497 } 498 } 499 z: { 500 if false { 501 err: {} 502 } 503 } 504 } 505 } 506 507 508 // Eliminate the top value even if there is an error (especially incomplete 509 // errors). 510 topElimination: { 511 a: int 512 _ 513 if true { 514 x: a+1 515 } 516 } 517 518 voidEliminationSuccess: drop1: { 519 // Do not include x in s. 520 t: { 521 #ok: *true | bool 522 if #ok { 523 x: int 524 } 525 } 526 s: t & { 527 #ok: false 528 } 529 } 530 531 // should be error 532 // issue #465 533 explicitDefaultError: { 534 a: string | *_|_ 535 536 if a != "" { 537 } 538 } 539 540 // Remove arcs for with no for comprehension results. 541 allArcsSuccess: p1: { 542 x: { 543 for k, _ in y { 544 (k): null 545 } 546 } 547 y: { 548 if false { 549 x: {} 550 } 551 } 552 } 553 554 allArcsSuccess: p2: { 555 y: { 556 if false { 557 x: {} 558 } 559 } 560 x: { 561 for k, _ in y { 562 (k): null 563 } 564 } 565 } 566 567 structShare: ok1: { 568 a: [string]: E 569 E: {} 570 571 a: { 572 if true { 573 d: e: true // resolves 574 } 575 } 576 } 577 578 structShare: err1: { 579 x: [string]: x.#E 580 x: #E: {} 581 if true { 582 x: d: e: true 583 } 584 } 585 586 -- issue2208.cue -- 587 voidErrorIncomplete: { 588 #Schema: [string]: { 589 required: bool 590 if !required { 591 } 592 } 593 594 root: #Schema 595 root: { 596 if false { 597 child: required: false 598 } 599 } 600 } 601 602 // TODO: should these always be errors, or only for cue vet? 603 // voidErrorFatal: pattern: { 604 // #Schema: [string]: { 605 // if "str" + 3 { 606 // } 607 // } 608 // 609 // root: #Schema 610 // root: { 611 // if false { 612 // child: required: false 613 // } 614 // } 615 // } 616 // 617 // voidErrorFatal: field: { 618 // root: { 619 // if false { 620 // child: 2 + "str" 621 // } 622 // } 623 // } 624 625 626 -- issue1759.cue -- 627 // Tests derived from Unity. 628 unity: success1: { 629 #Config: { 630 name: string 631 type: string 632 } 633 634 #AnyConfig: { 635 #Config 636 ... 637 } 638 639 #Env: { 640 name: string 641 configurations: [string]: #AnyConfig 642 } 643 644 envs: "e1": #Env & { 645 configurations: c1: #Config 646 } 647 648 envs: [string]: configurations: [string]: { 649 type: "foo" 650 if type == "terraform" { 651 backend: { 652 type: "s3" 653 } 654 } 655 } 656 } 657 658 issue1759: { 659 _ports_map: {} 660 if len(_ports_map) > 0 { 661 port: _ports_map.a.port 662 } 663 if true { 664 _ports_map: a: {port: "80"} 665 } 666 } 667 668 arcAlignment: t1: { 669 [string]: { 670 if true { } 671 } 672 if false { 673 c: _ 674 } 675 } 676 677 -- issue2111.cue -- 678 // All arc types, not just regular fields, should be pushed down. 679 letPushdown: { 680 _c: y: 1 681 682 a: { 683 for k, v in _c { 684 let x = v 685 if x != _|_ { 686 } 687 } 688 } 689 } 690 691 -- issue2113.cue -- 692 // Ensure that an enclosing Value clause of a nested comprehension is evaluated 693 // before the nested comprehension itself is evaluated. 694 nestedWithEmbeddingOK: { 695 c: [1] 696 a: { 697 for k, v in c { 698 {x: 1} 699 if a.x != _|_ { 700 } 701 } 702 } 703 } 704 705 nestedWithDynamicFieldOK: { 706 _c: y: 1 707 708 a: { 709 for k, v in _c { 710 if x != _|_ { 711 } 712 x="\(k)": 1 713 } 714 } 715 } 716 717 // Errors in nested comprehensions should also be reported. 718 errorPropagation: { 719 deployment: _ 720 for k, v in deployment { 721 for k1, v2 in v.env2 { // Report this error. 722 deployment: (k): x1: 1 723 } 724 } 725 for id in ["elem"] { deployment: (id): x2: 2 } 726 } 727 728 -- issue2131.cue -- 729 import "path" 730 731 issue2131: tests: { 732 windows: { 733 eg1: in: #"c:\"# 734 eg2: in: #"c:\test"# 735 eg3: in: #"c:\test\"# 736 } 737 738 for os, examples in tests for k, v in examples { 739 (os): (k): out: "test" 740 } 741 } 742 743 -- reflect.cue -- 744 import "encoding/json" 745 746 747 unifyDynamicReflectSuccess: { 748 for _, s in ["foo"] { 749 X: {...} 750 "\(s)": { 751 X: {...} // cannot be _ 752 Y: json.Marshal(X) // cannot be yaml, X cannot be literal 753 } 754 } 755 756 [string]: X: { 757 if true {// must be there 758 x: y: {} // at least 2 nestings needed to expose problem 759 } 760 } 761 } 762 763 -- out/evalalpha/stats -- 764 Leaks: 513 765 Freed: 2 766 Reused: 2 767 Allocs: 513 768 Retain: 0 769 770 Unifications: 489 771 Conjuncts: 2982 772 Disjuncts: 22 773 -- out/evalalpha -- 774 Errors: 775 noStackOverflowStructCycle.#list.tail: structural cycle 776 noStackOverflowStructCycle.list.tail: structural cycle 777 embed.fail1.p: field not allowed: 778 ./in.cue:46:7 779 ./in.cue:46:4 780 ./in.cue:49:9 781 embed.fail4.p: field not allowed: 782 ./in.cue:74:10 783 ./in.cue:74:4 784 fieldMismatch.a: cannot combine regular field "x" with 2: 785 ./in.cue:139:7 786 ./in.cue:137:3 787 structShare.err1.x.d.e: field not allowed: 788 ./in.cue:578:12 789 ./in.cue:578:9 790 791 Result: 792 (_|_){ 793 // [eval] 794 linkChildren: (struct){ 795 w: (int){ 1 } 796 v: (struct){ 797 x: (int){ 1 } 798 y: (int){ 1 } 799 z: (int){ 1 } 800 rw: (int){ 1 } 801 rx: (int){ 1 } 802 ry: (int){ 1 } 803 rz: (int){ 1 } 804 n1a: (struct){ 805 na: (#list){ 806 0: (int){ 1 } 807 1: (int){ 1 } 808 2: (int){ 1 } 809 3: (int){ 1 } 810 } 811 } 812 n2a: (struct){ 813 n1a: (struct){ 814 na: (#list){ 815 0: (int){ 1 } 816 1: (int){ 1 } 817 2: (int){ 1 } 818 3: (int){ 1 } 819 } 820 } 821 } 822 n2z: (struct){ 823 n1z: (struct){ 824 nz: (int){ 1 } 825 } 826 } 827 } 828 } 829 fail: (struct){ 830 a: (_|_){ 831 // [incomplete] fail.a.b: cyclic reference to field b: 832 // ./in.cue:30:3 833 } 834 } 835 embed: (_|_){ 836 // [eval] 837 fail1: (_|_){ 838 // [eval] 839 p: (_|_){ 840 // [eval] embed.fail1.p: field not allowed: 841 // ./in.cue:46:7 842 // ./in.cue:46:4 843 // ./in.cue:49:9 844 } 845 } 846 #C1: (#struct){ 847 } 848 success2: (#struct){ 849 p: (string){ "foo" } 850 } 851 #C2: (#struct){ 852 p: (_){ _ } 853 } 854 success3: (#struct){ 855 } 856 #C3: (#struct){ 857 } 858 fail4: (_|_){ 859 // [eval] 860 p: (_|_){ 861 // [eval] embed.fail4.p: field not allowed: 862 // ./in.cue:74:10 863 // ./in.cue:74:4 864 q: (int){ 1 } 865 } 866 } 867 #C4: (#struct){ 868 } 869 incomplete5: (_|_){ 870 // [incomplete] embed.incomplete5: incomplete bool: bool: 871 // ./in.cue:79:6 872 a: (bool){ bool } 873 } 874 incomplete6: (struct){ 875 p: (_|_){ 876 // [incomplete] embed.incomplete6.p: non-concrete value int in operand to +: 877 // ./in.cue:89:6 878 // ./in.cue:90:6 879 } 880 q: (int){ int } 881 } 882 incomplete7: (struct){ 883 p: (_|_){ 884 // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +: 885 // ./in.cue:93:6 886 // ./in.cue:94:6 887 } 888 q: (int){ int } 889 } 890 } 891 mixedFieldsSuccess: (struct){ 892 a: (struct){ 893 X: (int){ 1 } 894 foo: (int){ 1 } 895 } 896 b: (struct){ 897 #Def: (#struct){ 898 X: (int){ 1 } 899 foo: (int){ 1 } 900 } 901 x: (#struct){ 902 X: (int){ 1 } 903 foo: (int){ 1 } 904 } 905 } 906 c: (struct){ 907 #Def: (#struct){ 908 X: (int){ int } 909 foo: (int){ int } 910 } 911 x: (#struct){ 912 X: (int){ 1 } 913 foo: (int){ 1 } 914 } 915 } 916 } 917 fieldMismatch: (_|_){ 918 // [eval] 919 a: (_|_){ 920 // [eval] fieldMismatch.a: cannot combine regular field "x" with 2: 921 // ./in.cue:139:7 922 // ./in.cue:137:3 923 x: (int){ 3 } 924 } 925 } 926 noStackOverflowStructCycle: (_|_){ 927 // [structural cycle] 928 #list: (_|_){ 929 // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle 930 } 931 list: (_|_){ 932 // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle 933 } 934 } 935 provideIncompleteSuccess: (struct){ 936 t1: (struct){ 937 #a: (_|_){ 938 // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool: 939 // ./in.cue:172:7 940 b: (bool){ bool } 941 } 942 x: (#struct){ 943 b: (bool){ true } 944 c: (int){ 4 } 945 } 946 y: (#struct){ 947 b: (bool){ true } 948 c: (int){ 4 } 949 } 950 } 951 t2: (struct){ 952 #a: (#struct){ 953 c: (int){ 4 } 954 b: (bool){ true } 955 } 956 #c: (#struct){ 957 } 958 a: (struct){ 959 c: (#struct){ 960 } 961 b: (bool){ true } 962 } 963 } 964 } 965 voidArcs: (struct){ 966 scopes: (struct){ 967 x: (int){ 1 } 968 a: (struct){ 969 y: (int){ 2 } 970 b: (int){ 1 } 971 c: (struct){ 972 d: (int){ 1 } 973 } 974 e: (int){ 2 } 975 f: (struct){ 976 g: (int){ 2 } 977 } 978 } 979 } 980 drop: (struct){ 981 x: (int){ 1 } 982 a: (struct){ 983 y: (int){ 2 } 984 } 985 } 986 } 987 cyclicError: (struct){ 988 a: (_|_){ 989 // [incomplete] cyclicError.a: incomplete bool: bool: 990 // ./in.cue:232:6 991 x: (_|_){ 992 // [incomplete] cyclicError.a: incomplete bool: bool: 993 // ./in.cue:232:6 994 } 995 y: (_|_){ 996 // [incomplete] cyclicError.a: incomplete bool: bool: 997 // ./in.cue:232:6 998 } 999 b: (struct){ 1000 } 1001 } 1002 c: (_|_){ 1003 // [incomplete] cyclicError.a: incomplete bool: bool: 1004 // ./in.cue:232:6 1005 } 1006 } 1007 midwayReferences: (struct){ 1008 a: (struct){ 1009 x: (struct){ 1010 y: (struct){ 1011 z: (struct){ 1012 a: (int){ 1 } 1013 b: (int){ 2 } 1014 } 1015 } 1016 } 1017 } 1018 b: (struct){ 1019 y: (struct){ 1020 z: (struct){ 1021 a: (int){ 1 } 1022 b: (int){ 2 } 1023 } 1024 } 1025 } 1026 c: (struct){ 1027 z: (struct){ 1028 a: (int){ 1 } 1029 b: (int){ 2 } 1030 } 1031 } 1032 d: (struct){ 1033 a: (int){ 1 } 1034 b: (int){ 2 } 1035 } 1036 } 1037 closedCheck: (struct){ 1038 success1: (struct){ 1039 a: (struct){ 1040 b: (struct){ 1041 c: (#struct){ 1042 d: (string){ "d" } 1043 e: (string){ "ok" } 1044 } 1045 } 1046 } 1047 #D: (_|_){ 1048 // [incomplete] closedCheck.success1.#D: non-concrete value string in operand to !=: 1049 // ./in.cue:267:6 1050 // ./in.cue:266:6 1051 d: (string){ string } 1052 } 1053 } 1054 success2: (struct){ 1055 a: (struct){ 1056 b: (struct){ 1057 c: (#struct){ 1058 d: (string){ "d" } 1059 foobar: (string){ "ok" } 1060 } 1061 } 1062 } 1063 #D: (_|_){ 1064 // [incomplete] closedCheck.success2.#D: non-concrete value string in operand to !=: 1065 // ./in.cue:283:6 1066 // ./in.cue:282:6 1067 d: (string){ string } 1068 } 1069 } 1070 success3: (struct){ 1071 a: (struct){ 1072 b: (struct){ 1073 c: (#struct){ 1074 d: (string){ "d" } 1075 e: (string){ "ok" } 1076 } 1077 } 1078 } 1079 #D: (#struct){ 1080 d: (string){ string } 1081 e: (_|_){ 1082 // [incomplete] closedCheck.success3.#D.e: non-concrete value string in operand to !=: 1083 // ./in.cue:300:7 1084 // ./in.cue:298:6 1085 } 1086 } 1087 } 1088 } 1089 emptyComprehensionIncomplete: (struct){ 1090 a: (struct){ 1091 } 1092 b: (_|_){ 1093 // [incomplete] emptyComprehensionIncomplete.b: undefined field: b: 1094 // ./in.cue:316:8 1095 } 1096 } 1097 voidEliminationSuccess: (struct){ 1098 t1: (struct){ 1099 } 1100 t2: (struct){ 1101 components: (struct){ 1102 sinks: (struct){ 1103 blah: (#struct){ 1104 kind: (string){ "source" } 1105 configuration: (#struct){ 1106 } 1107 } 1108 } 1109 #C: (#struct){ 1110 kind: (string){ string } 1111 configuration: (#struct){ 1112 } 1113 } 1114 } 1115 } 1116 derefRef1: (struct){ 1117 a: (struct){ 1118 b: (struct){ 1119 c: (struct){ 1120 } 1121 } 1122 } 1123 E: (struct){ 1124 e: (bool){ bool } 1125 f: (_|_){ 1126 // [incomplete] voidEliminationSuccess.derefRef1.E.f: operand e of '!' not concrete (was bool): 1127 // ./in.cue:373:7 1128 } 1129 } 1130 } 1131 derefRef2: (struct){ 1132 a: (struct){ 1133 b: (struct){ 1134 c: (struct){ 1135 } 1136 } 1137 } 1138 E: (#struct){ 1139 e: (bool){ bool } 1140 f: (_|_){ 1141 // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool): 1142 // ./in.cue:389:7 1143 } 1144 } 1145 #F: (#struct){ 1146 e: (bool){ bool } 1147 f: (_|_){ 1148 // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool): 1149 // ./in.cue:389:7 1150 } 1151 } 1152 } 1153 derefDisj1: (struct){ 1154 a: (struct){ 1155 b: (struct){ 1156 c: (struct){ 1157 } 1158 } 1159 } 1160 E: (_|_){ 1161 // [incomplete] voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool): 1162 // ./in.cue:404:7 1163 // voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): 1164 // ./in.cue:407:7 1165 } 1166 } 1167 derefDisj2: (struct){ 1168 a: (struct){ 1169 b: (struct){ 1170 c: (struct){ 1171 } 1172 } 1173 } 1174 E: (_|_){ 1175 // [incomplete] voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool): 1176 // ./in.cue:422:7 1177 // voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): 1178 // ./in.cue:425:7 1179 } 1180 } 1181 bulk1: (struct){ 1182 a: (struct){ 1183 b: (struct){ 1184 c: (struct){ 1185 e: (string){ string } 1186 } 1187 d: (string){ string } 1188 } 1189 } 1190 } 1191 opt1: (struct){ 1192 a: (struct){ 1193 b: (struct){ 1194 c: (struct){ 1195 e: (string){ string } 1196 } 1197 d: (string){ string } 1198 } 1199 } 1200 } 1201 noCycle1: (struct){ 1202 _x: (struct){ 1203 } 1204 a: (struct){ 1205 c: (struct){ 1206 h: (string){ "stream" } 1207 } 1208 b: (struct){ 1209 } 1210 } 1211 } 1212 noCycle2: (struct){ 1213 a: (struct){ 1214 c: (struct){ 1215 h: (string){ "stream" } 1216 } 1217 b: (struct){ 1218 } 1219 } 1220 _x: (struct){ 1221 } 1222 } 1223 drop1: (struct){ 1224 t: (struct){ 1225 #ok: (bool){ |(*(bool){ true }, (bool){ bool }) } 1226 x: (int){ int } 1227 } 1228 s: (struct){ 1229 #ok: (bool){ false } 1230 } 1231 } 1232 } 1233 voidLookup: (struct){ 1234 a: (struct){ 1235 x: (struct){ 1236 z: (_|_){ 1237 // [incomplete] voidLookup.a.x.z: undefined field: void: 1238 // ./in.cue:482:17 1239 } 1240 c: (_|_){ 1241 // [incomplete] voidLookup.a.x.z: undefined field: void: 1242 // ./in.cue:482:17 1243 } 1244 } 1245 y: (struct){ 1246 c: (_){ _ } 1247 z: (struct){ 1248 } 1249 } 1250 } 1251 } 1252 topElimination: (struct){ 1253 a: (int){ int } 1254 x: (_|_){ 1255 // [incomplete] topElimination.x: non-concrete value int in operand to +: 1256 // ./in.cue:510:6 1257 // ./in.cue:507:5 1258 } 1259 } 1260 explicitDefaultError: (_|_){ 1261 // [incomplete] explicitDefaultError: non-concrete value string in operand to !=: 1262 // ./in.cue:532:5 1263 // ./in.cue:530:5 1264 a: (string){ string } 1265 } 1266 allArcsSuccess: (struct){ 1267 p1: (struct){ 1268 x: (struct){ 1269 } 1270 y: (struct){ 1271 } 1272 } 1273 p2: (struct){ 1274 y: (struct){ 1275 } 1276 x: (struct){ 1277 } 1278 } 1279 } 1280 structShare: (_|_){ 1281 // [eval] 1282 ok1: (struct){ 1283 a: (struct){ 1284 d: (struct){ 1285 e: (bool){ true } 1286 } 1287 } 1288 E: (struct){ 1289 } 1290 } 1291 err1: (_|_){ 1292 // [eval] 1293 x: (_|_){ 1294 // [eval] 1295 #E: (#struct){ 1296 } 1297 d: (_|_){ 1298 // [eval] 1299 e: (_|_){ 1300 // [eval] structShare.err1.x.d.e: field not allowed: 1301 // ./in.cue:578:12 1302 // ./in.cue:578:9 1303 } 1304 } 1305 } 1306 } 1307 } 1308 unity: (struct){ 1309 success1: (struct){ 1310 #Config: (#struct){ 1311 name: (string){ string } 1312 type: (string){ string } 1313 } 1314 #AnyConfig: (#struct){ 1315 name: (string){ string } 1316 type: (string){ string } 1317 } 1318 #Env: (#struct){ 1319 name: (string){ string } 1320 configurations: (#struct){ 1321 } 1322 } 1323 envs: (struct){ 1324 e1: (#struct){ 1325 configurations: (#struct){ 1326 c1: (#struct){ 1327 type: (string){ "foo" } 1328 name: (string){ string } 1329 } 1330 } 1331 name: (string){ string } 1332 } 1333 } 1334 } 1335 } 1336 issue1759: (struct){ 1337 _ports_map: (struct){ 1338 a: (struct){ 1339 port: (string){ "80" } 1340 } 1341 } 1342 port: (string){ "80" } 1343 } 1344 arcAlignment: (struct){ 1345 t1: (struct){ 1346 } 1347 } 1348 letPushdown: (struct){ 1349 _c: (struct){ 1350 y: (int){ 1 } 1351 } 1352 a: (struct){ 1353 let x#1multi = 〈1;v〉 1354 } 1355 } 1356 nestedWithEmbeddingOK: (struct){ 1357 c: (#list){ 1358 0: (int){ 1 } 1359 } 1360 a: (struct){ 1361 x: (int){ 1 } 1362 } 1363 } 1364 nestedWithDynamicFieldOK: (struct){ 1365 _c: (struct){ 1366 y: (int){ 1 } 1367 } 1368 a: (struct){ 1369 y: (int){ 1 } 1370 } 1371 } 1372 errorPropagation: (_|_){ 1373 // [incomplete] errorPropagation: undefined field: env2: 1374 // ./issue2113.cue:30:19 1375 deployment: (_|_){ 1376 // [incomplete] errorPropagation: undefined field: env2: 1377 // ./issue2113.cue:30:19 1378 elem: (struct){ 1379 x2: (int){ 2 } 1380 } 1381 } 1382 } 1383 issue2131: (struct){ 1384 tests: (struct){ 1385 windows: (struct){ 1386 eg1: (struct){ 1387 in: (string){ "c:\\" } 1388 out: (string){ "test" } 1389 } 1390 eg2: (struct){ 1391 in: (string){ "c:\\test" } 1392 out: (string){ "test" } 1393 } 1394 eg3: (struct){ 1395 in: (string){ "c:\\test\\" } 1396 out: (string){ "test" } 1397 } 1398 } 1399 } 1400 } 1401 voidErrorIncomplete: (struct){ 1402 #Schema: (#struct){ 1403 } 1404 root: (#struct){ 1405 } 1406 } 1407 unifyDynamicReflectSuccess: (struct){ 1408 X: (struct){ 1409 X: (struct){ 1410 x: (struct){ 1411 y: (struct){ 1412 } 1413 } 1414 } 1415 } 1416 foo: (struct){ 1417 X: (struct){ 1418 x: (struct){ 1419 y: (struct){ 1420 } 1421 } 1422 } 1423 Y: (string){ "{\"x\":{\"y\":{}}}" } 1424 } 1425 } 1426 } 1427 -- diff/-out/evalalpha<==>+out/eval -- 1428 diff old new 1429 --- old 1430 +++ new 1431 @@ -1,32 +1,19 @@ 1432 Errors: 1433 +noStackOverflowStructCycle.#list.tail: structural cycle 1434 +noStackOverflowStructCycle.list.tail: structural cycle 1435 embed.fail1.p: field not allowed: 1436 - ./in.cue:37:9 1437 - ./in.cue:38:7 1438 - ./in.cue:45:3 1439 - ./in.cue:45:12 1440 + ./in.cue:46:7 1441 ./in.cue:46:4 1442 ./in.cue:49:9 1443 embed.fail4.p: field not allowed: 1444 - ./in.cue:69:9 1445 - ./in.cue:70:7 1446 - ./in.cue:71:9 1447 - ./in.cue:72:3 1448 + ./in.cue:74:10 1449 ./in.cue:74:4 1450 -noStackOverflowStructCycle.#list.tail: structural cycle 1451 -noStackOverflowStructCycle.list.tail: structural cycle 1452 -provideIncompleteSuccess.t2.a.c.d: field not allowed: 1453 - ./in.cue:187:7 1454 - ./in.cue:189:4 1455 - ./in.cue:190:8 1456 - ./in.cue:195:7 1457 -structShare.err1.x.d.e: field not allowed: 1458 - ./in.cue:575:15 1459 - ./in.cue:576:9 1460 - ./in.cue:577:2 1461 - ./in.cue:578:9 1462 fieldMismatch.a: cannot combine regular field "x" with 2: 1463 ./in.cue:139:7 1464 ./in.cue:137:3 1465 +structShare.err1.x.d.e: field not allowed: 1466 + ./in.cue:578:12 1467 + ./in.cue:578:9 1468 1469 Result: 1470 (_|_){ 1471 @@ -68,8 +55,8 @@ 1472 } 1473 fail: (struct){ 1474 a: (_|_){ 1475 - // [cycle] fail.a: cycle with field a.b: 1476 - // ./in.cue:30:6 1477 + // [incomplete] fail.a.b: cyclic reference to field b: 1478 + // ./in.cue:30:3 1479 } 1480 } 1481 embed: (_|_){ 1482 @@ -78,10 +65,7 @@ 1483 // [eval] 1484 p: (_|_){ 1485 // [eval] embed.fail1.p: field not allowed: 1486 - // ./in.cue:37:9 1487 - // ./in.cue:38:7 1488 - // ./in.cue:45:3 1489 - // ./in.cue:45:12 1490 + // ./in.cue:46:7 1491 // ./in.cue:46:4 1492 // ./in.cue:49:9 1493 } 1494 @@ -102,10 +86,7 @@ 1495 // [eval] 1496 p: (_|_){ 1497 // [eval] embed.fail4.p: field not allowed: 1498 - // ./in.cue:69:9 1499 - // ./in.cue:70:7 1500 - // ./in.cue:71:9 1501 - // ./in.cue:72:3 1502 + // ./in.cue:74:10 1503 // ./in.cue:74:4 1504 q: (int){ 1 } 1505 } 1506 @@ -130,7 +111,6 @@ 1507 // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +: 1508 // ./in.cue:93:6 1509 // ./in.cue:94:6 1510 - // ./in.cue:95:3 1511 } 1512 q: (int){ int } 1513 } 1514 @@ -179,8 +159,7 @@ 1515 // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle 1516 } 1517 } 1518 - provideIncompleteSuccess: (_|_){ 1519 - // [eval] 1520 + provideIncompleteSuccess: (struct){ 1521 t1: (struct){ 1522 #a: (_|_){ 1523 // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool: 1524 @@ -188,16 +167,15 @@ 1525 b: (bool){ bool } 1526 } 1527 x: (#struct){ 1528 - c: (int){ 4 } 1529 - b: (bool){ true } 1530 + b: (bool){ true } 1531 + c: (int){ 4 } 1532 } 1533 y: (#struct){ 1534 - c: (int){ 4 } 1535 - b: (bool){ true } 1536 - } 1537 - } 1538 - t2: (_|_){ 1539 - // [eval] 1540 + b: (bool){ true } 1541 + c: (int){ 4 } 1542 + } 1543 + } 1544 + t2: (struct){ 1545 #a: (#struct){ 1546 c: (int){ 4 } 1547 b: (bool){ true } 1548 @@ -204,17 +182,8 @@ 1549 } 1550 #c: (#struct){ 1551 } 1552 - a: (_|_){ 1553 - // [eval] 1554 - c: (_|_){ 1555 - // [eval] 1556 - d: (_|_){ 1557 - // [eval] provideIncompleteSuccess.t2.a.c.d: field not allowed: 1558 - // ./in.cue:187:7 1559 - // ./in.cue:189:4 1560 - // ./in.cue:190:8 1561 - // ./in.cue:195:7 1562 - } 1563 + a: (struct){ 1564 + c: (#struct){ 1565 } 1566 b: (bool){ true } 1567 } 1568 @@ -244,9 +213,22 @@ 1569 } 1570 cyclicError: (struct){ 1571 a: (_|_){ 1572 - // [cycle] cycle error 1573 - } 1574 - c: (struct){ 1575 + // [incomplete] cyclicError.a: incomplete bool: bool: 1576 + // ./in.cue:232:6 1577 + x: (_|_){ 1578 + // [incomplete] cyclicError.a: incomplete bool: bool: 1579 + // ./in.cue:232:6 1580 + } 1581 + y: (_|_){ 1582 + // [incomplete] cyclicError.a: incomplete bool: bool: 1583 + // ./in.cue:232:6 1584 + } 1585 + b: (struct){ 1586 + } 1587 + } 1588 + c: (_|_){ 1589 + // [incomplete] cyclicError.a: incomplete bool: bool: 1590 + // ./in.cue:232:6 1591 } 1592 } 1593 midwayReferences: (struct){ 1594 @@ -383,7 +365,7 @@ 1595 E: (#struct){ 1596 e: (bool){ bool } 1597 f: (_|_){ 1598 - // [incomplete] voidEliminationSuccess.derefRef2.E.f: operand e of '!' not concrete (was bool): 1599 + // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool): 1600 // ./in.cue:389:7 1601 } 1602 } 1603 @@ -403,17 +385,10 @@ 1604 } 1605 } 1606 E: (_|_){ 1607 - // [incomplete] voidEliminationSuccess.derefDisj1.E: 2 errors in empty disjunction:: 1608 - // ./in.cue:394:28 1609 - // voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool): 1610 + // [incomplete] voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool): 1611 // ./in.cue:404:7 1612 // voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): 1613 // ./in.cue:407:7 1614 - g: (bool){ bool } 1615 - h: (_|_){ 1616 - // [incomplete] voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): 1617 - // ./in.cue:407:7 1618 - } 1619 } 1620 } 1621 derefDisj2: (struct){ 1622 @@ -424,17 +399,10 @@ 1623 } 1624 } 1625 E: (_|_){ 1626 - // [incomplete] voidEliminationSuccess.derefDisj2.E: 2 errors in empty disjunction:: 1627 - // ./in.cue:412:28 1628 - // voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool): 1629 + // [incomplete] voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool): 1630 // ./in.cue:422:7 1631 // voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): 1632 // ./in.cue:425:7 1633 - g: (bool){ bool } 1634 - h: (_|_){ 1635 - // [incomplete] voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): 1636 - // ./in.cue:425:7 1637 - } 1638 } 1639 } 1640 bulk1: (struct){ 1641 @@ -557,9 +525,7 @@ 1642 // [eval] 1643 e: (_|_){ 1644 // [eval] structShare.err1.x.d.e: field not allowed: 1645 - // ./in.cue:575:15 1646 - // ./in.cue:576:9 1647 - // ./in.cue:577:2 1648 + // ./in.cue:578:12 1649 // ./in.cue:578:9 1650 } 1651 } 1652 @@ -583,13 +549,13 @@ 1653 } 1654 envs: (struct){ 1655 e1: (#struct){ 1656 - name: (string){ string } 1657 configurations: (#struct){ 1658 c1: (#struct){ 1659 - name: (string){ string } 1660 type: (string){ "foo" } 1661 - } 1662 - } 1663 + name: (string){ string } 1664 + } 1665 + } 1666 + name: (string){ string } 1667 } 1668 } 1669 } 1670 @@ -626,9 +592,8 @@ 1671 _c: (struct){ 1672 y: (int){ 1 } 1673 } 1674 - a: (_|_){ 1675 - // [cycle] nestedWithDynamicFieldOK.a: circular dependency in evaluation of conditionals: "\(〈1;k〉)" changed after evaluation: 1676 - // ./issue2113.cue:19:7 1677 + a: (struct){ 1678 + y: (int){ 1 } 1679 } 1680 } 1681 errorPropagation: (_|_){ 1682 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- 1683 diff old new 1684 --- old 1685 +++ new 1686 @@ -1,9 +1,9 @@ 1687 -Leaks: 15 1688 -Freed: 394 1689 -Reused: 388 1690 -Allocs: 21 1691 -Retain: 100 1692 +Leaks: 513 1693 +Freed: 2 1694 +Reused: 2 1695 +Allocs: 513 1696 +Retain: 0 1697 1698 -Unifications: 395 1699 -Conjuncts: 636 1700 -Disjuncts: 464 1701 +Unifications: 489 1702 +Conjuncts: 2982 1703 +Disjuncts: 22 1704 -- out/eval/stats -- 1705 Leaks: 15 1706 Freed: 405 1707 Reused: 399 1708 Allocs: 21 1709 Retain: 101 1710 1711 Unifications: 406 1712 Conjuncts: 652 1713 Disjuncts: 476 1714 -- diff/todo/p2 -- 1715 Missing empty disjunction message. 1716 provideIncompleteSuccess.t2.a.c.d: missing error: probably correct. 1717 A bit esoteric, but should probably work. 1718 -- diff/explanation -- 1719 cyclicError: improved error message. 1720 nestedWithDynamicFieldOK: fixed bug. 1721 -- out/eval -- 1722 Errors: 1723 embed.fail1.p: field not allowed: 1724 ./in.cue:37:9 1725 ./in.cue:38:7 1726 ./in.cue:45:3 1727 ./in.cue:45:12 1728 ./in.cue:46:4 1729 ./in.cue:49:9 1730 embed.fail4.p: field not allowed: 1731 ./in.cue:69:9 1732 ./in.cue:70:7 1733 ./in.cue:71:9 1734 ./in.cue:72:3 1735 ./in.cue:74:4 1736 noStackOverflowStructCycle.#list.tail: structural cycle 1737 noStackOverflowStructCycle.list.tail: structural cycle 1738 provideIncompleteSuccess.t2.a.c.d: field not allowed: 1739 ./in.cue:187:7 1740 ./in.cue:189:4 1741 ./in.cue:190:8 1742 ./in.cue:195:7 1743 structShare.err1.x.d.e: field not allowed: 1744 ./in.cue:575:15 1745 ./in.cue:576:9 1746 ./in.cue:577:2 1747 ./in.cue:578:9 1748 fieldMismatch.a: cannot combine regular field "x" with 2: 1749 ./in.cue:139:7 1750 ./in.cue:137:3 1751 1752 Result: 1753 (_|_){ 1754 // [eval] 1755 linkChildren: (struct){ 1756 w: (int){ 1 } 1757 v: (struct){ 1758 x: (int){ 1 } 1759 y: (int){ 1 } 1760 z: (int){ 1 } 1761 rw: (int){ 1 } 1762 rx: (int){ 1 } 1763 ry: (int){ 1 } 1764 rz: (int){ 1 } 1765 n1a: (struct){ 1766 na: (#list){ 1767 0: (int){ 1 } 1768 1: (int){ 1 } 1769 2: (int){ 1 } 1770 3: (int){ 1 } 1771 } 1772 } 1773 n2a: (struct){ 1774 n1a: (struct){ 1775 na: (#list){ 1776 0: (int){ 1 } 1777 1: (int){ 1 } 1778 2: (int){ 1 } 1779 3: (int){ 1 } 1780 } 1781 } 1782 } 1783 n2z: (struct){ 1784 n1z: (struct){ 1785 nz: (int){ 1 } 1786 } 1787 } 1788 } 1789 } 1790 fail: (struct){ 1791 a: (_|_){ 1792 // [cycle] fail.a: cycle with field a.b: 1793 // ./in.cue:30:6 1794 } 1795 } 1796 embed: (_|_){ 1797 // [eval] 1798 fail1: (_|_){ 1799 // [eval] 1800 p: (_|_){ 1801 // [eval] embed.fail1.p: field not allowed: 1802 // ./in.cue:37:9 1803 // ./in.cue:38:7 1804 // ./in.cue:45:3 1805 // ./in.cue:45:12 1806 // ./in.cue:46:4 1807 // ./in.cue:49:9 1808 } 1809 } 1810 #C1: (#struct){ 1811 } 1812 success2: (#struct){ 1813 p: (string){ "foo" } 1814 } 1815 #C2: (#struct){ 1816 p: (_){ _ } 1817 } 1818 success3: (#struct){ 1819 } 1820 #C3: (#struct){ 1821 } 1822 fail4: (_|_){ 1823 // [eval] 1824 p: (_|_){ 1825 // [eval] embed.fail4.p: field not allowed: 1826 // ./in.cue:69:9 1827 // ./in.cue:70:7 1828 // ./in.cue:71:9 1829 // ./in.cue:72:3 1830 // ./in.cue:74:4 1831 q: (int){ 1 } 1832 } 1833 } 1834 #C4: (#struct){ 1835 } 1836 incomplete5: (_|_){ 1837 // [incomplete] embed.incomplete5: incomplete bool: bool: 1838 // ./in.cue:79:6 1839 a: (bool){ bool } 1840 } 1841 incomplete6: (struct){ 1842 p: (_|_){ 1843 // [incomplete] embed.incomplete6.p: non-concrete value int in operand to +: 1844 // ./in.cue:89:6 1845 // ./in.cue:90:6 1846 } 1847 q: (int){ int } 1848 } 1849 incomplete7: (struct){ 1850 p: (_|_){ 1851 // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +: 1852 // ./in.cue:93:6 1853 // ./in.cue:94:6 1854 // ./in.cue:95:3 1855 } 1856 q: (int){ int } 1857 } 1858 } 1859 mixedFieldsSuccess: (struct){ 1860 a: (struct){ 1861 X: (int){ 1 } 1862 foo: (int){ 1 } 1863 } 1864 b: (struct){ 1865 #Def: (#struct){ 1866 X: (int){ 1 } 1867 foo: (int){ 1 } 1868 } 1869 x: (#struct){ 1870 X: (int){ 1 } 1871 foo: (int){ 1 } 1872 } 1873 } 1874 c: (struct){ 1875 #Def: (#struct){ 1876 X: (int){ int } 1877 foo: (int){ int } 1878 } 1879 x: (#struct){ 1880 X: (int){ 1 } 1881 foo: (int){ 1 } 1882 } 1883 } 1884 } 1885 fieldMismatch: (_|_){ 1886 // [eval] 1887 a: (_|_){ 1888 // [eval] fieldMismatch.a: cannot combine regular field "x" with 2: 1889 // ./in.cue:139:7 1890 // ./in.cue:137:3 1891 x: (int){ 3 } 1892 } 1893 } 1894 noStackOverflowStructCycle: (_|_){ 1895 // [structural cycle] 1896 #list: (_|_){ 1897 // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle 1898 } 1899 list: (_|_){ 1900 // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle 1901 } 1902 } 1903 provideIncompleteSuccess: (_|_){ 1904 // [eval] 1905 t1: (struct){ 1906 #a: (_|_){ 1907 // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool: 1908 // ./in.cue:172:7 1909 b: (bool){ bool } 1910 } 1911 x: (#struct){ 1912 c: (int){ 4 } 1913 b: (bool){ true } 1914 } 1915 y: (#struct){ 1916 c: (int){ 4 } 1917 b: (bool){ true } 1918 } 1919 } 1920 t2: (_|_){ 1921 // [eval] 1922 #a: (#struct){ 1923 c: (int){ 4 } 1924 b: (bool){ true } 1925 } 1926 #c: (#struct){ 1927 } 1928 a: (_|_){ 1929 // [eval] 1930 c: (_|_){ 1931 // [eval] 1932 d: (_|_){ 1933 // [eval] provideIncompleteSuccess.t2.a.c.d: field not allowed: 1934 // ./in.cue:187:7 1935 // ./in.cue:189:4 1936 // ./in.cue:190:8 1937 // ./in.cue:195:7 1938 } 1939 } 1940 b: (bool){ true } 1941 } 1942 } 1943 } 1944 voidArcs: (struct){ 1945 scopes: (struct){ 1946 x: (int){ 1 } 1947 a: (struct){ 1948 y: (int){ 2 } 1949 b: (int){ 1 } 1950 c: (struct){ 1951 d: (int){ 1 } 1952 } 1953 e: (int){ 2 } 1954 f: (struct){ 1955 g: (int){ 2 } 1956 } 1957 } 1958 } 1959 drop: (struct){ 1960 x: (int){ 1 } 1961 a: (struct){ 1962 y: (int){ 2 } 1963 } 1964 } 1965 } 1966 cyclicError: (struct){ 1967 a: (_|_){ 1968 // [cycle] cycle error 1969 } 1970 c: (struct){ 1971 } 1972 } 1973 midwayReferences: (struct){ 1974 a: (struct){ 1975 x: (struct){ 1976 y: (struct){ 1977 z: (struct){ 1978 a: (int){ 1 } 1979 b: (int){ 2 } 1980 } 1981 } 1982 } 1983 } 1984 b: (struct){ 1985 y: (struct){ 1986 z: (struct){ 1987 a: (int){ 1 } 1988 b: (int){ 2 } 1989 } 1990 } 1991 } 1992 c: (struct){ 1993 z: (struct){ 1994 a: (int){ 1 } 1995 b: (int){ 2 } 1996 } 1997 } 1998 d: (struct){ 1999 a: (int){ 1 } 2000 b: (int){ 2 } 2001 } 2002 } 2003 closedCheck: (struct){ 2004 success1: (struct){ 2005 a: (struct){ 2006 b: (struct){ 2007 c: (#struct){ 2008 d: (string){ "d" } 2009 e: (string){ "ok" } 2010 } 2011 } 2012 } 2013 #D: (_|_){ 2014 // [incomplete] closedCheck.success1.#D: non-concrete value string in operand to !=: 2015 // ./in.cue:267:6 2016 // ./in.cue:266:6 2017 d: (string){ string } 2018 } 2019 } 2020 success2: (struct){ 2021 a: (struct){ 2022 b: (struct){ 2023 c: (#struct){ 2024 d: (string){ "d" } 2025 foobar: (string){ "ok" } 2026 } 2027 } 2028 } 2029 #D: (_|_){ 2030 // [incomplete] closedCheck.success2.#D: non-concrete value string in operand to !=: 2031 // ./in.cue:283:6 2032 // ./in.cue:282:6 2033 d: (string){ string } 2034 } 2035 } 2036 success3: (struct){ 2037 a: (struct){ 2038 b: (struct){ 2039 c: (#struct){ 2040 d: (string){ "d" } 2041 e: (string){ "ok" } 2042 } 2043 } 2044 } 2045 #D: (#struct){ 2046 d: (string){ string } 2047 e: (_|_){ 2048 // [incomplete] closedCheck.success3.#D.e: non-concrete value string in operand to !=: 2049 // ./in.cue:300:7 2050 // ./in.cue:298:6 2051 } 2052 } 2053 } 2054 } 2055 emptyComprehensionIncomplete: (struct){ 2056 a: (struct){ 2057 } 2058 b: (_|_){ 2059 // [incomplete] emptyComprehensionIncomplete.b: undefined field: b: 2060 // ./in.cue:316:8 2061 } 2062 } 2063 voidEliminationSuccess: (struct){ 2064 t1: (struct){ 2065 } 2066 t2: (struct){ 2067 components: (struct){ 2068 sinks: (struct){ 2069 blah: (#struct){ 2070 kind: (string){ "source" } 2071 configuration: (#struct){ 2072 } 2073 } 2074 } 2075 #C: (#struct){ 2076 kind: (string){ string } 2077 configuration: (#struct){ 2078 } 2079 } 2080 } 2081 } 2082 derefRef1: (struct){ 2083 a: (struct){ 2084 b: (struct){ 2085 c: (struct){ 2086 } 2087 } 2088 } 2089 E: (struct){ 2090 e: (bool){ bool } 2091 f: (_|_){ 2092 // [incomplete] voidEliminationSuccess.derefRef1.E.f: operand e of '!' not concrete (was bool): 2093 // ./in.cue:373:7 2094 } 2095 } 2096 } 2097 derefRef2: (struct){ 2098 a: (struct){ 2099 b: (struct){ 2100 c: (struct){ 2101 } 2102 } 2103 } 2104 E: (#struct){ 2105 e: (bool){ bool } 2106 f: (_|_){ 2107 // [incomplete] voidEliminationSuccess.derefRef2.E.f: operand e of '!' not concrete (was bool): 2108 // ./in.cue:389:7 2109 } 2110 } 2111 #F: (#struct){ 2112 e: (bool){ bool } 2113 f: (_|_){ 2114 // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool): 2115 // ./in.cue:389:7 2116 } 2117 } 2118 } 2119 derefDisj1: (struct){ 2120 a: (struct){ 2121 b: (struct){ 2122 c: (struct){ 2123 } 2124 } 2125 } 2126 E: (_|_){ 2127 // [incomplete] voidEliminationSuccess.derefDisj1.E: 2 errors in empty disjunction:: 2128 // ./in.cue:394:28 2129 // voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool): 2130 // ./in.cue:404:7 2131 // voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): 2132 // ./in.cue:407:7 2133 g: (bool){ bool } 2134 h: (_|_){ 2135 // [incomplete] voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool): 2136 // ./in.cue:407:7 2137 } 2138 } 2139 } 2140 derefDisj2: (struct){ 2141 a: (struct){ 2142 b: (struct){ 2143 c: (struct){ 2144 } 2145 } 2146 } 2147 E: (_|_){ 2148 // [incomplete] voidEliminationSuccess.derefDisj2.E: 2 errors in empty disjunction:: 2149 // ./in.cue:412:28 2150 // voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool): 2151 // ./in.cue:422:7 2152 // voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): 2153 // ./in.cue:425:7 2154 g: (bool){ bool } 2155 h: (_|_){ 2156 // [incomplete] voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool): 2157 // ./in.cue:425:7 2158 } 2159 } 2160 } 2161 bulk1: (struct){ 2162 a: (struct){ 2163 b: (struct){ 2164 c: (struct){ 2165 e: (string){ string } 2166 } 2167 d: (string){ string } 2168 } 2169 } 2170 } 2171 opt1: (struct){ 2172 a: (struct){ 2173 b: (struct){ 2174 c: (struct){ 2175 e: (string){ string } 2176 } 2177 d: (string){ string } 2178 } 2179 } 2180 } 2181 noCycle1: (struct){ 2182 _x: (struct){ 2183 } 2184 a: (struct){ 2185 c: (struct){ 2186 h: (string){ "stream" } 2187 } 2188 b: (struct){ 2189 } 2190 } 2191 } 2192 noCycle2: (struct){ 2193 a: (struct){ 2194 c: (struct){ 2195 h: (string){ "stream" } 2196 } 2197 b: (struct){ 2198 } 2199 } 2200 _x: (struct){ 2201 } 2202 } 2203 drop1: (struct){ 2204 t: (struct){ 2205 #ok: (bool){ |(*(bool){ true }, (bool){ bool }) } 2206 x: (int){ int } 2207 } 2208 s: (struct){ 2209 #ok: (bool){ false } 2210 } 2211 } 2212 } 2213 voidLookup: (struct){ 2214 a: (struct){ 2215 x: (struct){ 2216 z: (_|_){ 2217 // [incomplete] voidLookup.a.x.z: undefined field: void: 2218 // ./in.cue:482:17 2219 } 2220 c: (_|_){ 2221 // [incomplete] voidLookup.a.x.z: undefined field: void: 2222 // ./in.cue:482:17 2223 } 2224 } 2225 y: (struct){ 2226 c: (_){ _ } 2227 z: (struct){ 2228 } 2229 } 2230 } 2231 } 2232 topElimination: (struct){ 2233 a: (int){ int } 2234 x: (_|_){ 2235 // [incomplete] topElimination.x: non-concrete value int in operand to +: 2236 // ./in.cue:510:6 2237 // ./in.cue:507:5 2238 } 2239 } 2240 explicitDefaultError: (_|_){ 2241 // [incomplete] explicitDefaultError: non-concrete value string in operand to !=: 2242 // ./in.cue:532:5 2243 // ./in.cue:530:5 2244 a: (string){ string } 2245 } 2246 allArcsSuccess: (struct){ 2247 p1: (struct){ 2248 x: (struct){ 2249 } 2250 y: (struct){ 2251 } 2252 } 2253 p2: (struct){ 2254 y: (struct){ 2255 } 2256 x: (struct){ 2257 } 2258 } 2259 } 2260 structShare: (_|_){ 2261 // [eval] 2262 ok1: (struct){ 2263 a: (struct){ 2264 d: (struct){ 2265 e: (bool){ true } 2266 } 2267 } 2268 E: (struct){ 2269 } 2270 } 2271 err1: (_|_){ 2272 // [eval] 2273 x: (_|_){ 2274 // [eval] 2275 #E: (#struct){ 2276 } 2277 d: (_|_){ 2278 // [eval] 2279 e: (_|_){ 2280 // [eval] structShare.err1.x.d.e: field not allowed: 2281 // ./in.cue:575:15 2282 // ./in.cue:576:9 2283 // ./in.cue:577:2 2284 // ./in.cue:578:9 2285 } 2286 } 2287 } 2288 } 2289 } 2290 unity: (struct){ 2291 success1: (struct){ 2292 #Config: (#struct){ 2293 name: (string){ string } 2294 type: (string){ string } 2295 } 2296 #AnyConfig: (#struct){ 2297 name: (string){ string } 2298 type: (string){ string } 2299 } 2300 #Env: (#struct){ 2301 name: (string){ string } 2302 configurations: (#struct){ 2303 } 2304 } 2305 envs: (struct){ 2306 e1: (#struct){ 2307 name: (string){ string } 2308 configurations: (#struct){ 2309 c1: (#struct){ 2310 name: (string){ string } 2311 type: (string){ "foo" } 2312 } 2313 } 2314 } 2315 } 2316 } 2317 } 2318 issue1759: (struct){ 2319 _ports_map: (struct){ 2320 a: (struct){ 2321 port: (string){ "80" } 2322 } 2323 } 2324 port: (string){ "80" } 2325 } 2326 arcAlignment: (struct){ 2327 t1: (struct){ 2328 } 2329 } 2330 letPushdown: (struct){ 2331 _c: (struct){ 2332 y: (int){ 1 } 2333 } 2334 a: (struct){ 2335 let x#1multi = 〈1;v〉 2336 } 2337 } 2338 nestedWithEmbeddingOK: (struct){ 2339 c: (#list){ 2340 0: (int){ 1 } 2341 } 2342 a: (struct){ 2343 x: (int){ 1 } 2344 } 2345 } 2346 nestedWithDynamicFieldOK: (struct){ 2347 _c: (struct){ 2348 y: (int){ 1 } 2349 } 2350 a: (_|_){ 2351 // [cycle] nestedWithDynamicFieldOK.a: circular dependency in evaluation of conditionals: "\(〈1;k〉)" changed after evaluation: 2352 // ./issue2113.cue:19:7 2353 } 2354 } 2355 errorPropagation: (_|_){ 2356 // [incomplete] errorPropagation: undefined field: env2: 2357 // ./issue2113.cue:30:19 2358 deployment: (_|_){ 2359 // [incomplete] errorPropagation: undefined field: env2: 2360 // ./issue2113.cue:30:19 2361 elem: (struct){ 2362 x2: (int){ 2 } 2363 } 2364 } 2365 } 2366 issue2131: (struct){ 2367 tests: (struct){ 2368 windows: (struct){ 2369 eg1: (struct){ 2370 in: (string){ "c:\\" } 2371 out: (string){ "test" } 2372 } 2373 eg2: (struct){ 2374 in: (string){ "c:\\test" } 2375 out: (string){ "test" } 2376 } 2377 eg3: (struct){ 2378 in: (string){ "c:\\test\\" } 2379 out: (string){ "test" } 2380 } 2381 } 2382 } 2383 } 2384 voidErrorIncomplete: (struct){ 2385 #Schema: (#struct){ 2386 } 2387 root: (#struct){ 2388 } 2389 } 2390 unifyDynamicReflectSuccess: (struct){ 2391 X: (struct){ 2392 X: (struct){ 2393 x: (struct){ 2394 y: (struct){ 2395 } 2396 } 2397 } 2398 } 2399 foo: (struct){ 2400 X: (struct){ 2401 x: (struct){ 2402 y: (struct){ 2403 } 2404 } 2405 } 2406 Y: (string){ "{\"x\":{\"y\":{}}}" } 2407 } 2408 } 2409 } 2410 -- out/compile -- 2411 --- in.cue 2412 { 2413 linkChildren: { 2414 w: 1 2415 v: { 2416 x: 1 2417 if true { 2418 y: 1 2419 if true { 2420 z: 1 2421 rw: 〈3;w〉 2422 rx: 〈2;x〉 2423 ry: 〈1;y〉 2424 rz: 〈0;z〉 2425 n1a: { 2426 na: [ 2427 〈5;w〉, 2428 〈4;x〉, 2429 〈3;y〉, 2430 〈2;z〉, 2431 ] 2432 } 2433 n2a: { 2434 n1a: { 2435 na: [ 2436 〈6;w〉, 2437 〈5;x〉, 2438 〈4;y〉, 2439 〈3;z〉, 2440 ] 2441 } 2442 } 2443 n2z: { 2444 n1z: { 2445 nz: 〈2;z〉 2446 } 2447 } 2448 } 2449 } 2450 } 2451 } 2452 fail: { 2453 a: { 2454 if (〈1;a〉.b == _|_(explicit error (_|_ literal) in source)) { 2455 b: 1 2456 } 2457 } 2458 } 2459 embed: { 2460 fail1: 〈0;#C1〉 2461 #C1: { 2462 if false { 2463 p: _ 2464 } 2465 } 2466 fail1: { 2467 p: "foo" 2468 } 2469 success2: 〈0;#C2〉 2470 #C2: { 2471 if true { 2472 p: _ 2473 } 2474 } 2475 success2: { 2476 p: "foo" 2477 } 2478 success3: 〈0;#C3〉 2479 #C3: {} 2480 success3: { 2481 if false { 2482 p: { 2483 q: 1 2484 } 2485 } 2486 } 2487 fail4: 〈0;#C4〉 2488 #C4: {} 2489 fail4: { 2490 if true { 2491 p: { 2492 q: 1 2493 } 2494 } 2495 } 2496 incomplete5: { 2497 a: bool 2498 if 〈0;a〉 { 2499 p: { 2500 q: 1 2501 } 2502 } 2503 } 2504 incomplete6: { 2505 if false { 2506 p: 1 2507 } 2508 p: (〈0;q〉 + 1) 2509 q: int 2510 } 2511 incomplete7: { 2512 p: (〈0;q〉 + 1) 2513 q: int 2514 if false { 2515 q: 1 2516 } 2517 } 2518 } 2519 mixedFieldsSuccess: { 2520 a: { 2521 for _, s in [ 2522 "foo", 2523 ] { 2524 "\(〈1;s〉)": 1 2525 X: 1 2526 } 2527 } 2528 b: { 2529 #Def: { 2530 for _, s in [ 2531 "foo", 2532 ] { 2533 "\(〈1;s〉)": 1 2534 X: 1 2535 } 2536 } 2537 } 2538 b: { 2539 x: 〈1;b〉.#Def 2540 } 2541 b: { 2542 x: { 2543 X: _ 2544 } 2545 } 2546 b: { 2547 x: { 2548 foo: _ 2549 } 2550 } 2551 c: { 2552 #Def: { 2553 X: int 2554 foo: int 2555 } 2556 } 2557 c: { 2558 x: 〈1;c〉.#Def 2559 } 2560 c: { 2561 x: { 2562 for _, s in [ 2563 "foo", 2564 ] { 2565 "\(〈1;s〉)": 1 2566 X: 1 2567 } 2568 } 2569 } 2570 } 2571 fieldMismatch: { 2572 a: { 2573 2 2574 if true { 2575 x: 3 2576 } 2577 } 2578 } 2579 noStackOverflowStructCycle: { 2580 #list: { 2581 tail: 〈1;#list〉 2582 if (〈0;tail〉 != null) { 2583 sum: 〈1;tail〉.sum 2584 } 2585 } 2586 list: { 2587 tail: 〈1;list〉 2588 if (〈0;tail〉 != null) { 2589 sum: 〈1;tail〉.sum 2590 } 2591 } 2592 } 2593 provideIncompleteSuccess: { 2594 t1: { 2595 #a: { 2596 if 〈0;b〉 { 2597 c: 4 2598 } 2599 b: bool 2600 } 2601 x: ((〈0;#a〉 & { 2602 b: true 2603 }) & { 2604 c: 4 2605 }) 2606 y: 〈0;x〉 2607 } 2608 t2: { 2609 #a: { 2610 if 〈0;b〉 { 2611 c: 4 2612 } 2613 b: true 2614 } 2615 #c: {} 2616 a: { 2617 if 〈0;b〉 { 2618 c: { 2619 d: 4 2620 } 2621 } 2622 b: true 2623 c: 〈1;#c〉 2624 } 2625 } 2626 } 2627 voidArcs: { 2628 scopes: { 2629 x: 1 2630 a: { 2631 y: 2 2632 if true { 2633 b: 〈2;x〉 2634 c: { 2635 d: 〈3;x〉 2636 } 2637 e: 〈1;y〉 2638 f: { 2639 g: 〈2;y〉 2640 } 2641 } 2642 } 2643 } 2644 drop: { 2645 x: 1 2646 a: { 2647 y: 2 2648 if false { 2649 b: 〈2;x〉 2650 c: { 2651 d: 〈3;x〉 2652 } 2653 e: 〈1;y〉 2654 f: { 2655 g: 〈2;y〉 2656 } 2657 } 2658 } 2659 } 2660 } 2661 cyclicError: { 2662 a: { 2663 x: bool 2664 y: bool 2665 if 〈1;a〉.x { 2666 y: true 2667 } 2668 if 〈1;a〉.y { 2669 x: true 2670 } 2671 b: {} 2672 } 2673 c: 〈0;a〉.b 2674 } 2675 midwayReferences: { 2676 a: { 2677 for i, j in { 2678 a: 1 2679 b: 2 2680 } { 2681 x: { 2682 y: { 2683 z: { 2684 〈4;i〉: 〈4;j〉 2685 } 2686 } 2687 } 2688 } 2689 x: { 2690 y: {} 2691 } 2692 } 2693 b: 〈0;a〉.x 2694 c: 〈0;a〉.x.y 2695 d: 〈0;a〉.x.y.z 2696 } 2697 closedCheck: { 2698 success1: { 2699 a: { 2700 b: { 2701 [string]: 〈2;#D〉 2702 } 2703 } 2704 #D: { 2705 d: string 2706 if (〈0;d〉 != "c") { 2707 e: string 2708 } 2709 } 2710 a: { 2711 b: { 2712 c: { 2713 d: "d" 2714 e: "ok" 2715 } 2716 } 2717 } 2718 } 2719 } 2720 closedCheck: { 2721 success2: { 2722 a: { 2723 b: { 2724 [string]: 〈2;#D〉 2725 } 2726 } 2727 #D: { 2728 d: string 2729 if (〈0;d〉 != "c") { 2730 ("foo" + "bar"): string 2731 } 2732 } 2733 a: { 2734 b: { 2735 c: { 2736 d: "d" 2737 foobar: "ok" 2738 } 2739 } 2740 } 2741 } 2742 } 2743 closedCheck: { 2744 success3: { 2745 a: { 2746 b: { 2747 [string]: 〈2;#D〉 2748 } 2749 } 2750 #D: { 2751 d: string 2752 e: { 2753 if (〈1;d〉 != "c") { 2754 string 2755 } 2756 } 2757 } 2758 a: { 2759 b: { 2760 c: { 2761 d: "d" 2762 e: "ok" 2763 } 2764 } 2765 } 2766 } 2767 } 2768 emptyComprehensionIncomplete: { 2769 a: {} 2770 b: { 2771 if 〈1;a〉.b {} 2772 } 2773 } 2774 voidEliminationSuccess: { 2775 t1: { 2776 [string]: { 2777 b: bool 2778 if !〈0;b〉 {} 2779 } 2780 if false { 2781 a: { 2782 b: true 2783 } 2784 } 2785 } 2786 } 2787 voidEliminationSuccess: { 2788 t2: { 2789 components: { 2790 sinks: { 2791 [string]: (〈1;#C〉 & { 2792 kind: string 2793 configuration: { 2794 if (〈1;kind〉 != "source") { 2795 inputs: { 2796 required: true 2797 } 2798 } 2799 } 2800 }) 2801 } 2802 #C: { 2803 kind: string 2804 configuration: { 2805 [string]: { 2806 required: bool 2807 if !〈0;required〉 { 2808 common: bool 2809 } 2810 } 2811 } 2812 } 2813 } 2814 components: { 2815 sinks: { 2816 blah: { 2817 kind: "source" 2818 } 2819 } 2820 } 2821 } 2822 } 2823 voidEliminationSuccess: { 2824 derefRef1: { 2825 a: { 2826 [string]: { 2827 c: { 2828 [string]: 〈3;E〉 2829 } 2830 } 2831 } 2832 a: { 2833 b: { 2834 c: { 2835 if false { 2836 d: { 2837 e: true 2838 } 2839 } 2840 } 2841 } 2842 } 2843 E: { 2844 e: bool 2845 f: !〈0;e〉 2846 } 2847 } 2848 } 2849 voidEliminationSuccess: { 2850 derefRef2: { 2851 a: { 2852 [string]: { 2853 c: { 2854 [string]: 〈3;E〉 2855 } 2856 } 2857 } 2858 a: { 2859 b: { 2860 c: { 2861 if false { 2862 d: { 2863 e: true 2864 } 2865 } 2866 } 2867 } 2868 } 2869 E: 〈0;#F〉 2870 #F: { 2871 e: bool 2872 f: !〈0;e〉 2873 } 2874 } 2875 } 2876 voidEliminationSuccess: { 2877 derefDisj1: { 2878 a: { 2879 [string]: { 2880 c: { 2881 [string]: 〈3;E〉 2882 } 2883 } 2884 } 2885 a: { 2886 b: { 2887 c: { 2888 if false { 2889 d: { 2890 e: true 2891 } 2892 } 2893 } 2894 } 2895 } 2896 E: ({ 2897 e: bool 2898 f: !〈0;e〉 2899 }|{ 2900 g: bool 2901 h: !〈0;g〉 2902 }) 2903 } 2904 } 2905 voidEliminationSuccess: { 2906 derefDisj2: { 2907 a: { 2908 [string]: { 2909 c: { 2910 [string]: (〈3;E〉 & 〈3;E〉) 2911 } 2912 } 2913 } 2914 a: { 2915 b: { 2916 c: { 2917 if false { 2918 d: { 2919 e: true 2920 } 2921 } 2922 } 2923 } 2924 } 2925 E: ({ 2926 e: bool 2927 f: !〈0;e〉 2928 }|{ 2929 g: bool 2930 h: !〈0;g〉 2931 }) 2932 } 2933 } 2934 voidEliminationSuccess: { 2935 bulk1: { 2936 a: { 2937 b: {} 2938 } 2939 a: { 2940 [string]: { 2941 c: { 2942 e: string 2943 if false { 2944 e: "" 2945 } 2946 } 2947 d: 〈0;c〉.e 2948 } 2949 } 2950 } 2951 } 2952 voidEliminationSuccess: { 2953 opt1: { 2954 a: { 2955 b: {} 2956 } 2957 a: { 2958 b?: { 2959 c: { 2960 e: string 2961 if false { 2962 e: "" 2963 } 2964 } 2965 d: 〈0;c〉.e 2966 } 2967 } 2968 } 2969 } 2970 voidEliminationSuccess: { 2971 noCycle1: { 2972 _x: 〈0;a〉.b 2973 a: { 2974 c: { 2975 h: "stream" 2976 } 2977 b: { 2978 if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {} 2979 } 2980 c: { 2981 if false { 2982 g: _ 2983 } 2984 } 2985 } 2986 } 2987 } 2988 voidEliminationSuccess: { 2989 noCycle2: { 2990 a: { 2991 c: { 2992 h: "stream" 2993 } 2994 b: { 2995 if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {} 2996 } 2997 c: { 2998 if false { 2999 g: _ 3000 } 3001 } 3002 } 3003 _x: 〈0;a〉.b 3004 } 3005 } 3006 voidLookup: { 3007 a: { 3008 x: { 3009 z: 〈2;a〉.y.z.void 3010 } 3011 } 3012 a: { 3013 y: { 3014 c: _ 3015 z: {} 3016 } 3017 } 3018 a: { 3019 [string]: { 3020 c: { 3021 for k, v in 〈1;z〉 { 3022 〈1;k〉: null 3023 } 3024 } 3025 z: { 3026 if false { 3027 err: {} 3028 } 3029 } 3030 } 3031 } 3032 } 3033 topElimination: { 3034 a: int 3035 _ 3036 if true { 3037 x: (〈1;a〉 + 1) 3038 } 3039 } 3040 voidEliminationSuccess: { 3041 drop1: { 3042 t: { 3043 #ok: (*true|bool) 3044 if 〈0;#ok〉 { 3045 x: int 3046 } 3047 } 3048 s: (〈0;t〉 & { 3049 #ok: false 3050 }) 3051 } 3052 } 3053 explicitDefaultError: { 3054 a: (string|*_|_(explicit error (_|_ literal) in source)) 3055 if (〈0;a〉 != "") {} 3056 } 3057 allArcsSuccess: { 3058 p1: { 3059 x: { 3060 for k, _ in 〈1;y〉 { 3061 〈1;k〉: null 3062 } 3063 } 3064 y: { 3065 if false { 3066 x: {} 3067 } 3068 } 3069 } 3070 } 3071 allArcsSuccess: { 3072 p2: { 3073 y: { 3074 if false { 3075 x: {} 3076 } 3077 } 3078 x: { 3079 for k, _ in 〈1;y〉 { 3080 〈1;k〉: null 3081 } 3082 } 3083 } 3084 } 3085 structShare: { 3086 ok1: { 3087 a: { 3088 [string]: 〈1;E〉 3089 } 3090 E: {} 3091 a: { 3092 if true { 3093 d: { 3094 e: true 3095 } 3096 } 3097 } 3098 } 3099 } 3100 structShare: { 3101 err1: { 3102 x: { 3103 [string]: 〈1;x〉.#E 3104 } 3105 x: { 3106 #E: {} 3107 } 3108 if true { 3109 x: { 3110 d: { 3111 e: true 3112 } 3113 } 3114 } 3115 } 3116 } 3117 } 3118 --- issue1759.cue 3119 { 3120 unity: { 3121 success1: { 3122 #Config: { 3123 name: string 3124 type: string 3125 } 3126 #AnyConfig: { 3127 〈1;#Config〉 3128 ... 3129 } 3130 #Env: { 3131 name: string 3132 configurations: { 3133 [string]: 〈2;#AnyConfig〉 3134 } 3135 } 3136 envs: { 3137 e1: (〈1;#Env〉 & { 3138 configurations: { 3139 c1: 〈3;#Config〉 3140 } 3141 }) 3142 } 3143 envs: { 3144 [string]: { 3145 configurations: { 3146 [string]: { 3147 type: "foo" 3148 if (〈0;type〉 == "terraform") { 3149 backend: { 3150 type: "s3" 3151 } 3152 } 3153 } 3154 } 3155 } 3156 } 3157 } 3158 } 3159 issue1759: { 3160 _ports_map: {} 3161 if (len(〈0;_ports_map〉) > 0) { 3162 port: 〈1;_ports_map〉.a.port 3163 } 3164 if true { 3165 _ports_map: { 3166 a: { 3167 port: "80" 3168 } 3169 } 3170 } 3171 } 3172 arcAlignment: { 3173 t1: { 3174 [string]: { 3175 if true {} 3176 } 3177 if false { 3178 c: _ 3179 } 3180 } 3181 } 3182 } 3183 --- issue2111.cue 3184 { 3185 letPushdown: { 3186 _c: { 3187 y: 1 3188 } 3189 a: { 3190 for k, v in 〈1;_c〉 { 3191 let x#1multi = 〈1;v〉 3192 if (〈0;let x#1〉 != _|_(explicit error (_|_ literal) in source)) {} 3193 } 3194 } 3195 } 3196 } 3197 --- issue2113.cue 3198 { 3199 nestedWithEmbeddingOK: { 3200 c: [ 3201 1, 3202 ] 3203 a: { 3204 for k, v in 〈1;c〉 { 3205 { 3206 x: 1 3207 } 3208 if (〈3;a〉.x != _|_(explicit error (_|_ literal) in source)) {} 3209 } 3210 } 3211 } 3212 nestedWithDynamicFieldOK: { 3213 _c: { 3214 y: 1 3215 } 3216 a: { 3217 for k, v in 〈1;_c〉 { 3218 if (〈0;("\(〈1;k〉)")〉 != _|_(explicit error (_|_ literal) in source)) {} 3219 "\(〈1;k〉)": 1 3220 } 3221 } 3222 } 3223 errorPropagation: { 3224 deployment: _ 3225 for k, v in 〈0;deployment〉 { 3226 for k1, v2 in 〈1;v〉.env2 { 3227 deployment: { 3228 〈4;k〉: { 3229 x1: 1 3230 } 3231 } 3232 } 3233 } 3234 for _, id in [ 3235 "elem", 3236 ] { 3237 deployment: { 3238 〈2;id〉: { 3239 x2: 2 3240 } 3241 } 3242 } 3243 } 3244 } 3245 --- issue2131.cue 3246 { 3247 issue2131: { 3248 tests: { 3249 windows: { 3250 eg1: { 3251 in: "c:\\" 3252 } 3253 eg2: { 3254 in: "c:\\test" 3255 } 3256 eg3: { 3257 in: "c:\\test\\" 3258 } 3259 } 3260 for os, examples in 〈1;tests〉 for k, v in 〈0;examples〉 { 3261 〈2;os〉: { 3262 〈2;k〉: { 3263 out: "test" 3264 } 3265 } 3266 } 3267 } 3268 } 3269 } 3270 --- issue2208.cue 3271 { 3272 voidErrorIncomplete: { 3273 #Schema: { 3274 [string]: { 3275 required: bool 3276 if !〈0;required〉 {} 3277 } 3278 } 3279 root: 〈0;#Schema〉 3280 root: { 3281 if false { 3282 child: { 3283 required: false 3284 } 3285 } 3286 } 3287 } 3288 } 3289 --- reflect.cue 3290 { 3291 unifyDynamicReflectSuccess: { 3292 for _, s in [ 3293 "foo", 3294 ] { 3295 X: { 3296 ... 3297 } 3298 "\(〈1;s〉)": { 3299 X: { 3300 ... 3301 } 3302 Y: 〈import;"encoding/json"〉.Marshal(〈0;X〉) 3303 } 3304 } 3305 [string]: { 3306 X: { 3307 if true { 3308 x: { 3309 y: {} 3310 } 3311 } 3312 } 3313 } 3314 } 3315 }