cuelang.org/go@v0.13.0/internal/core/export/testdata/main/let.txtar (about) 1 # Issue #590 2 3 -- in.cue -- 4 let X = 1 + 1 5 #Foo: X 6 -- x.cue -- 7 x: string 8 9 let Y = x 10 y: Y 11 -- y.cue -- 12 x: "foo" 13 14 // Note: although syntactically the same, this is a different let clause than 15 // the one from before and thus will be renamed. 16 // Issue #590 17 let Y = x 18 y: Y 19 -- issue593.cue -- 20 cfgs: [for crd in ["one", "two"] { 21 metadata: { 22 name: crd 23 } 24 }] 25 for cfg in cfgs { 26 let filepath = "kind-\(cfg.name)" 27 files: { 28 "\(filepath)": { 29 patches: cfg 30 } 31 } 32 } 33 -- for.cue -- 34 comprehension: { 35 for cfg in [{a: "one"}] { 36 let filepath = "kind-\(cfg.name)" 37 "\(filepath)": { 38 patches: cfg 39 } 40 } 41 } 42 -- scope.cue -- 43 scoped: { 44 _args: required: 1 45 direct: { 46 let Args = _args 47 a: Args.required 48 } 49 embed1: { 50 let Args = _args 51 a: {Args.required} 52 } 53 embed2: { 54 let Args = _args 55 a: {{Args.required}} 56 } 57 list: { 58 let Args = _args 59 a: [Args.required] 60 } 61 listStruct: { 62 let Args = _args 63 a: [{a: Args.required}] 64 } 65 listEmbed: { 66 let Args = _args 67 a: [{Args.required}] 68 } 69 } 70 -- incomplete.cue -- 71 complete: { 72 let A = run.a 73 x: "a \(A) z" 74 run: { 75 a: "foo" 76 } 77 } 78 incomplete: a: { 79 x: "a \(run.a) z" 80 run: { 81 a: string 82 } 83 } 84 incomplete: b: { 85 let A = run.a 86 x: "a \(A) z" 87 run: { 88 a: string 89 } 90 } 91 incomplete: c: { 92 { 93 let A = run.a 94 x: "a \(A) z" 95 run: a: string 96 } 97 { 98 let A = run2.a 99 x2: "a \(A) z" 100 run2: a: string 101 } 102 } 103 incomplete: d: { 104 let A = run.a 105 x: "a \(A) z" 106 run: a: string 107 } & { 108 let A = run2.a 109 x2: "a \(A) z" 110 run2: a: string 111 } 112 113 unresolvedDisjunction: { 114 #TypePrimitive: { 115 _args: { 116 required: bool 117 } 118 let Args = _args 119 120 {"*": {}} | 121 {"bool": #TypeBool & {_args: required: Args.required}} 122 } 123 124 #TypeBool: { 125 _args: required: bool 126 let Args = _args 127 128 if !Args.required { 129 // `default` sets the default value. 130 default: bool | null 131 } 132 } 133 } 134 -- out/definition -- 135 136 let X = 1 + 1 137 let Y = x 138 let Y_1 = x 139 { 140 cfgs: [for crd in ["one", "two"] { 141 metadata: { 142 name: crd 143 } 144 }] 145 for cfg in cfgs { 146 let filepath = "kind-\(cfg.name)" 147 files: { 148 "\(filepath)": { 149 patches: cfg 150 } 151 } 152 } 153 } 154 comprehension: { 155 for cfg in [{ 156 a: "one" 157 }] { 158 let filepath_1 = "kind-\(cfg.name)" 159 "\(filepath_1)": { 160 patches: cfg 161 } 162 } 163 } 164 #Foo: X 165 complete: { 166 let A = run.a 167 x: "a \(A) z" 168 run: { 169 a: "foo" 170 } 171 } 172 scoped: { 173 _args: { 174 required: 1 175 } 176 direct: { 177 let Args = _args 178 a: Args.required 179 } 180 embed1: { 181 let Args_1 = _args 182 a: Args_1.required 183 } 184 embed2: { 185 let Args_2 = _args 186 a: Args_2.required 187 } 188 list: { 189 let Args_3 = _args 190 a: [Args_3.required] 191 } 192 listStruct: { 193 let Args_4 = _args 194 a: [{ 195 a: Args_4.required 196 }] 197 } 198 listEmbed: { 199 let Args_8 = _args 200 a: [Args_8.required] 201 } 202 } 203 x: "foo" 204 incomplete: { 205 a: { 206 x: "a \(run.a) z" 207 run: { 208 a: string 209 } 210 } 211 b: { 212 let A_1 = run.a 213 x: "a \(A_1) z" 214 run: { 215 a: string 216 } 217 } 218 c: { 219 let A_2 = run.a 220 let A_3 = run2.a 221 x: "a \(A_2) z" 222 x2: "a \(A_3) z" 223 run: { 224 a: string 225 } 226 run2: { 227 a: string 228 } 229 } 230 d: { 231 let A_4 = run.a 232 let A_32 = run2.a 233 x: "a \(A_4) z" 234 x2: "a \(A_32) z" 235 run: { 236 a: string 237 } 238 run2: { 239 a: string 240 } 241 } 242 } 243 unresolvedDisjunction: { 244 #TypePrimitive: { 245 let Args_9 = _args 246 { 247 "*": {} 248 } | { 249 bool: #TypeBool & { 250 _args: { 251 required: Args_9.required 252 } 253 } 254 } 255 _args: { 256 required: bool 257 } 258 } 259 #TypeBool: { 260 let Args_B = _args 261 _args: { 262 required: bool 263 } 264 265 if !Args_B.required { 266 // `default` sets the default value. 267 default: bool | null 268 } 269 } 270 } 271 y: Y & Y_1 272 -- out/doc -- 273 [] 274 [comprehension] 275 [comprehension filepath] 276 [X] 277 [#Foo] 278 [complete] 279 [complete A] 280 [complete x] 281 [complete run] 282 [complete run a] 283 [incomplete] 284 [incomplete a] 285 [incomplete a x] 286 [incomplete a run] 287 [incomplete a run a] 288 [incomplete b] 289 [incomplete b A] 290 [incomplete b x] 291 [incomplete b run] 292 [incomplete b run a] 293 [incomplete c] 294 [incomplete c A] 295 [incomplete c x] 296 [incomplete c run] 297 [incomplete c run a] 298 [incomplete c A] 299 [incomplete c x2] 300 [incomplete c run2] 301 [incomplete c run2 a] 302 [incomplete d] 303 [incomplete d A] 304 [incomplete d x] 305 [incomplete d run] 306 [incomplete d run a] 307 [incomplete d A] 308 [incomplete d x2] 309 [incomplete d run2] 310 [incomplete d run2 a] 311 [unresolvedDisjunction] 312 [unresolvedDisjunction #TypePrimitive] 313 [unresolvedDisjunction #TypePrimitive _args] 314 [unresolvedDisjunction #TypePrimitive _args required] 315 [unresolvedDisjunction #TypePrimitive Args] 316 [unresolvedDisjunction #TypePrimitive Args required] 317 [unresolvedDisjunction #TypePrimitive "*"] 318 [unresolvedDisjunction #TypeBool] 319 [unresolvedDisjunction #TypeBool _args] 320 [unresolvedDisjunction #TypeBool _args required] 321 [unresolvedDisjunction #TypeBool Args] 322 [unresolvedDisjunction #TypeBool Args required] 323 [cfgs] 324 [cfgs 0] 325 [cfgs 0 metadata] 326 [cfgs 0 metadata name] 327 [cfgs 1] 328 [cfgs 1 metadata] 329 [cfgs 1 metadata name] 330 [filepath] 331 [files] 332 [scoped] 333 [scoped _args] 334 [scoped _args required] 335 [scoped direct] 336 [scoped direct Args] 337 [scoped direct Args required] 338 [scoped direct a] 339 [scoped embed1] 340 [scoped embed1 Args] 341 [scoped embed1 Args required] 342 [scoped embed1 a] 343 [scoped embed2] 344 [scoped embed2 Args] 345 [scoped embed2 Args required] 346 [scoped embed2 a] 347 [scoped list] 348 [scoped list Args] 349 [scoped list Args required] 350 [scoped list a] 351 [scoped list a 0] 352 [scoped listStruct] 353 [scoped listStruct Args] 354 [scoped listStruct Args required] 355 [scoped listStruct a] 356 [scoped listStruct a 0] 357 [scoped listStruct a 0 a] 358 [scoped listEmbed] 359 [scoped listEmbed Args] 360 [scoped listEmbed Args required] 361 [scoped listEmbed a] 362 [scoped listEmbed a 0] 363 [x] 364 [Y] 365 [y] 366 [Y] 367 -- out/value-v3 -- 368 == Simplified 369 { 370 cfgs: [{ 371 metadata: { 372 name: "one" 373 } 374 }, { 375 metadata: { 376 name: "two" 377 } 378 }] 379 complete: { 380 x: "a foo z" 381 run: { 382 a: "foo" 383 } 384 } 385 comprehension: { 386 for cfg in [{ 387 a: "one" 388 }] { 389 let filepath = "kind-\(cfg.name)" 390 "\(filepath)": { 391 patches: cfg 392 } 393 } 394 } 395 files: { 396 "\("kind-\(cfg.name)")": { 397 patches: cfg 398 } 399 } 400 incomplete: { 401 a: { 402 x: "a \(run.a) z" 403 run: { 404 a: string 405 } 406 } 407 b: { 408 let A = run.a 409 x: "a \(A) z" 410 run: { 411 a: string 412 } 413 } 414 c: { 415 let A_1 = run.a 416 let A_2 = run2.a 417 x: "a \(A_1) z" 418 run: { 419 a: string 420 } 421 x2: "a \(A_2) z" 422 run2: { 423 a: string 424 } 425 } 426 d: { 427 let A_3 = run.a 428 let A_4 = run2.a 429 x: "a \(A_3) z" 430 run: { 431 a: string 432 } 433 x2: "a \(A_4) z" 434 run2: { 435 a: string 436 } 437 } 438 } 439 scoped: { 440 direct: { 441 a: 1 442 } 443 embed1: { 444 a: 1 445 } 446 embed2: { 447 a: 1 448 } 449 list: { 450 a: [1] 451 } 452 listStruct: { 453 a: [{ 454 a: 1 455 }] 456 } 457 listEmbed: { 458 a: [1] 459 } 460 } 461 unresolvedDisjunction: {} 462 x: "foo" 463 y: "foo" 464 } 465 == Raw 466 { 467 #Foo: 2 468 cfgs: [{ 469 metadata: { 470 name: "one" 471 } 472 }, { 473 metadata: { 474 name: "two" 475 } 476 }] 477 complete: { 478 x: "a foo z" 479 run: { 480 a: "foo" 481 } 482 } 483 comprehension: { 484 for cfg in [{ 485 a: "one" 486 }] { 487 let filepath = "kind-\(cfg.name)" 488 "\(filepath)": { 489 patches: cfg 490 } 491 } 492 } 493 files: { 494 "\("kind-\(cfg.name)")": { 495 patches: cfg 496 } 497 } 498 incomplete: { 499 a: { 500 x: "a \(run.a) z" 501 run: { 502 a: string 503 } 504 } 505 b: { 506 let A = run.a 507 x: "a \(A) z" 508 run: { 509 a: string 510 } 511 } 512 c: { 513 let A_1 = run.a 514 let A_2 = run2.a 515 x: "a \(A_1) z" 516 run: { 517 a: string 518 } 519 x2: "a \(A_2) z" 520 run2: { 521 a: string 522 } 523 } 524 d: { 525 let A_3 = run.a 526 let A_4 = run2.a 527 x: "a \(A_3) z" 528 run: { 529 a: string 530 } 531 x2: "a \(A_4) z" 532 run2: { 533 a: string 534 } 535 } 536 } 537 scoped: { 538 _args: { 539 required: 1 540 } 541 direct: { 542 a: 1 543 } 544 embed1: { 545 a: 1 546 } 547 embed2: { 548 a: 1 549 } 550 list: { 551 a: [1] 552 } 553 listStruct: { 554 a: [{ 555 a: 1 556 }] 557 } 558 listEmbed: { 559 a: [1] 560 } 561 } 562 unresolvedDisjunction: { 563 #TypePrimitive: { 564 _args: { 565 required: bool 566 } 567 "*": {} 568 } 569 #TypeBool: { 570 let Args = _args 571 _args: { 572 required: bool 573 } 574 575 if !Args.required { 576 // `default` sets the default value. 577 default: bool | null 578 } 579 } 580 } 581 x: "foo" 582 y: "foo" 583 } 584 == Final 585 { 586 cfgs: [{ 587 metadata: { 588 name: "one" 589 } 590 }, { 591 metadata: { 592 name: "two" 593 } 594 }] 595 complete: { 596 x: "a foo z" 597 run: { 598 a: "foo" 599 } 600 } 601 comprehension: _|_ // comprehension: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: comprehension.filepath: undefined field: name) (and 1 more errors) 602 files: _|_ // files: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: filepath: undefined field: name) (and 3 more errors) 603 incomplete: { 604 a: { 605 x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string) 606 run: { 607 a: string 608 } 609 } 610 b: { 611 x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string) 612 run: { 613 a: string 614 } 615 } 616 c: { 617 x: _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string) 618 run: { 619 a: string 620 } 621 x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string) 622 run2: { 623 a: string 624 } 625 } 626 d: { 627 x: _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string) 628 run: { 629 a: string 630 } 631 x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string) 632 run2: { 633 a: string 634 } 635 } 636 } 637 scoped: { 638 direct: { 639 a: 1 640 } 641 embed1: { 642 a: 1 643 } 644 embed2: { 645 a: 1 646 } 647 list: { 648 a: [1] 649 } 650 listStruct: { 651 a: [{ 652 a: 1 653 }] 654 } 655 listEmbed: { 656 a: [1] 657 } 658 } 659 unresolvedDisjunction: {} 660 x: "foo" 661 y: "foo" 662 } 663 == All 664 { 665 #Foo: 2 666 cfgs: [{ 667 metadata: { 668 name: "one" 669 } 670 }, { 671 metadata: { 672 name: "two" 673 } 674 }] 675 complete: { 676 x: "a foo z" 677 run: { 678 a: "foo" 679 } 680 } 681 comprehension: { 682 for cfg in [{ 683 a: "one" 684 }] { 685 let filepath = "kind-\(cfg.name)" 686 "\(filepath)": { 687 patches: cfg 688 } 689 } 690 } 691 files: { 692 "\("kind-\(cfg.name)")": { 693 patches: cfg 694 } 695 } 696 incomplete: { 697 a: { 698 x: "a \(run.a) z" 699 run: { 700 a: string 701 } 702 } 703 b: { 704 let A = run.a 705 x: "a \(A) z" 706 run: { 707 a: string 708 } 709 } 710 c: { 711 let A_1 = run.a 712 let A_2 = run2.a 713 x: "a \(A_1) z" 714 run: { 715 a: string 716 } 717 x2: "a \(A_2) z" 718 run2: { 719 a: string 720 } 721 } 722 d: { 723 let A_3 = run.a 724 let A_4 = run2.a 725 x: "a \(A_3) z" 726 run: { 727 a: string 728 } 729 x2: "a \(A_4) z" 730 run2: { 731 a: string 732 } 733 } 734 } 735 scoped: { 736 _args: { 737 required: 1 738 } 739 direct: { 740 a: 1 741 } 742 embed1: { 743 a: 1 744 } 745 embed2: { 746 a: 1 747 } 748 list: { 749 a: [1] 750 } 751 listStruct: { 752 a: [{ 753 a: 1 754 }] 755 } 756 listEmbed: { 757 a: [1] 758 } 759 } 760 unresolvedDisjunction: { 761 #TypePrimitive: { 762 _args: { 763 required: bool 764 } 765 "*": {} 766 } 767 #TypeBool: { 768 let Args = _args 769 _args: { 770 required: bool 771 } 772 773 if !Args.required { 774 // `default` sets the default value. 775 default: bool | null 776 } 777 } 778 } 779 x: "foo" 780 y: "foo" 781 } 782 == Eval 783 { 784 #Foo: 2 785 cfgs: [{ 786 metadata: { 787 name: "one" 788 } 789 }, { 790 metadata: { 791 name: "two" 792 } 793 }] 794 complete: { 795 x: "a foo z" 796 run: { 797 a: "foo" 798 } 799 } 800 comprehension: { 801 for cfg in [{ 802 a: "one" 803 }] { 804 let filepath = "kind-\(cfg.name)" 805 "\(filepath)": { 806 patches: cfg 807 } 808 } 809 } 810 files: { 811 "\("kind-\(cfg.name)")": { 812 patches: cfg 813 } 814 } 815 incomplete: { 816 a: { 817 x: "a \(run.a) z" 818 run: { 819 a: string 820 } 821 } 822 b: { 823 let A = run.a 824 x: "a \(A) z" 825 run: { 826 a: string 827 } 828 } 829 c: { 830 let A_1 = run.a 831 let A_2 = run2.a 832 x: "a \(A_1) z" 833 run: { 834 a: string 835 } 836 x2: "a \(A_2) z" 837 run2: { 838 a: string 839 } 840 } 841 d: { 842 let A_3 = run.a 843 let A_4 = run2.a 844 x: "a \(A_3) z" 845 run: { 846 a: string 847 } 848 x2: "a \(A_4) z" 849 run2: { 850 a: string 851 } 852 } 853 } 854 scoped: { 855 direct: { 856 a: 1 857 } 858 embed1: { 859 a: 1 860 } 861 embed2: { 862 a: 1 863 } 864 list: { 865 a: [1] 866 } 867 listStruct: { 868 a: [{ 869 a: 1 870 }] 871 } 872 listEmbed: { 873 a: [1] 874 } 875 } 876 unresolvedDisjunction: { 877 #TypePrimitive: { 878 "*": {} 879 } 880 #TypeBool: { 881 let Args = _args 882 _args: { 883 required: bool 884 } 885 886 if !Args.required { 887 default: bool | null 888 } 889 } 890 } 891 x: "foo" 892 y: "foo" 893 } 894 -- diff/-out/value-v3<==>+out/value -- 895 diff old new 896 --- old 897 +++ new 898 @@ -231,8 +231,8 @@ 899 a: "foo" 900 } 901 } 902 - comprehension: _|_ // invalid interpolation: cycle error 903 - files: _|_ // invalid interpolation: cycle error (and 1 more errors) 904 + comprehension: _|_ // comprehension: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: comprehension.filepath: undefined field: name) (and 1 more errors) 905 + files: _|_ // files: key value of dynamic field must be concrete, found _|_(invalid interpolation: invalid interpolation: filepath: undefined field: name) (and 3 more errors) 906 incomplete: { 907 a: { 908 x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string) 909 -- diff/value/explanation -- 910 Improved error messages. 911 -- out/value -- 912 == Simplified 913 { 914 cfgs: [{ 915 metadata: { 916 name: "one" 917 } 918 }, { 919 metadata: { 920 name: "two" 921 } 922 }] 923 complete: { 924 x: "a foo z" 925 run: { 926 a: "foo" 927 } 928 } 929 comprehension: { 930 for cfg in [{ 931 a: "one" 932 }] { 933 let filepath = "kind-\(cfg.name)" 934 "\(filepath)": { 935 patches: cfg 936 } 937 } 938 } 939 files: { 940 "\("kind-\(cfg.name)")": { 941 patches: cfg 942 } 943 } 944 incomplete: { 945 a: { 946 x: "a \(run.a) z" 947 run: { 948 a: string 949 } 950 } 951 b: { 952 let A = run.a 953 x: "a \(A) z" 954 run: { 955 a: string 956 } 957 } 958 c: { 959 let A_1 = run.a 960 let A_2 = run2.a 961 x: "a \(A_1) z" 962 run: { 963 a: string 964 } 965 x2: "a \(A_2) z" 966 run2: { 967 a: string 968 } 969 } 970 d: { 971 let A_3 = run.a 972 let A_4 = run2.a 973 x: "a \(A_3) z" 974 run: { 975 a: string 976 } 977 x2: "a \(A_4) z" 978 run2: { 979 a: string 980 } 981 } 982 } 983 scoped: { 984 direct: { 985 a: 1 986 } 987 embed1: { 988 a: 1 989 } 990 embed2: { 991 a: 1 992 } 993 list: { 994 a: [1] 995 } 996 listStruct: { 997 a: [{ 998 a: 1 999 }] 1000 } 1001 listEmbed: { 1002 a: [1] 1003 } 1004 } 1005 unresolvedDisjunction: {} 1006 x: "foo" 1007 y: "foo" 1008 } 1009 == Raw 1010 { 1011 #Foo: 2 1012 cfgs: [{ 1013 metadata: { 1014 name: "one" 1015 } 1016 }, { 1017 metadata: { 1018 name: "two" 1019 } 1020 }] 1021 complete: { 1022 x: "a foo z" 1023 run: { 1024 a: "foo" 1025 } 1026 } 1027 comprehension: { 1028 for cfg in [{ 1029 a: "one" 1030 }] { 1031 let filepath = "kind-\(cfg.name)" 1032 "\(filepath)": { 1033 patches: cfg 1034 } 1035 } 1036 } 1037 files: { 1038 "\("kind-\(cfg.name)")": { 1039 patches: cfg 1040 } 1041 } 1042 incomplete: { 1043 a: { 1044 x: "a \(run.a) z" 1045 run: { 1046 a: string 1047 } 1048 } 1049 b: { 1050 let A = run.a 1051 x: "a \(A) z" 1052 run: { 1053 a: string 1054 } 1055 } 1056 c: { 1057 let A_1 = run.a 1058 let A_2 = run2.a 1059 x: "a \(A_1) z" 1060 run: { 1061 a: string 1062 } 1063 x2: "a \(A_2) z" 1064 run2: { 1065 a: string 1066 } 1067 } 1068 d: { 1069 let A_3 = run.a 1070 let A_4 = run2.a 1071 x: "a \(A_3) z" 1072 run: { 1073 a: string 1074 } 1075 x2: "a \(A_4) z" 1076 run2: { 1077 a: string 1078 } 1079 } 1080 } 1081 scoped: { 1082 _args: { 1083 required: 1 1084 } 1085 direct: { 1086 a: 1 1087 } 1088 embed1: { 1089 a: 1 1090 } 1091 embed2: { 1092 a: 1 1093 } 1094 list: { 1095 a: [1] 1096 } 1097 listStruct: { 1098 a: [{ 1099 a: 1 1100 }] 1101 } 1102 listEmbed: { 1103 a: [1] 1104 } 1105 } 1106 unresolvedDisjunction: { 1107 #TypePrimitive: { 1108 _args: { 1109 required: bool 1110 } 1111 "*": {} 1112 } 1113 #TypeBool: { 1114 let Args = _args 1115 _args: { 1116 required: bool 1117 } 1118 1119 if !Args.required { 1120 // `default` sets the default value. 1121 default: bool | null 1122 } 1123 } 1124 } 1125 x: "foo" 1126 y: "foo" 1127 } 1128 == Final 1129 { 1130 cfgs: [{ 1131 metadata: { 1132 name: "one" 1133 } 1134 }, { 1135 metadata: { 1136 name: "two" 1137 } 1138 }] 1139 complete: { 1140 x: "a foo z" 1141 run: { 1142 a: "foo" 1143 } 1144 } 1145 comprehension: _|_ // invalid interpolation: cycle error 1146 files: _|_ // invalid interpolation: cycle error (and 1 more errors) 1147 incomplete: { 1148 a: { 1149 x: _|_ // invalid interpolation: incomplete.a.x: non-concrete value string (type string) 1150 run: { 1151 a: string 1152 } 1153 } 1154 b: { 1155 x: _|_ // invalid interpolation: incomplete.b.x: non-concrete value string (type string) 1156 run: { 1157 a: string 1158 } 1159 } 1160 c: { 1161 x: _|_ // invalid interpolation: incomplete.c.x: non-concrete value string (type string) 1162 run: { 1163 a: string 1164 } 1165 x2: _|_ // invalid interpolation: incomplete.c.x2: non-concrete value string (type string) 1166 run2: { 1167 a: string 1168 } 1169 } 1170 d: { 1171 x: _|_ // invalid interpolation: incomplete.d.x: non-concrete value string (type string) 1172 run: { 1173 a: string 1174 } 1175 x2: _|_ // invalid interpolation: incomplete.d.x2: non-concrete value string (type string) 1176 run2: { 1177 a: string 1178 } 1179 } 1180 } 1181 scoped: { 1182 direct: { 1183 a: 1 1184 } 1185 embed1: { 1186 a: 1 1187 } 1188 embed2: { 1189 a: 1 1190 } 1191 list: { 1192 a: [1] 1193 } 1194 listStruct: { 1195 a: [{ 1196 a: 1 1197 }] 1198 } 1199 listEmbed: { 1200 a: [1] 1201 } 1202 } 1203 unresolvedDisjunction: {} 1204 x: "foo" 1205 y: "foo" 1206 } 1207 == All 1208 { 1209 #Foo: 2 1210 cfgs: [{ 1211 metadata: { 1212 name: "one" 1213 } 1214 }, { 1215 metadata: { 1216 name: "two" 1217 } 1218 }] 1219 complete: { 1220 x: "a foo z" 1221 run: { 1222 a: "foo" 1223 } 1224 } 1225 comprehension: { 1226 for cfg in [{ 1227 a: "one" 1228 }] { 1229 let filepath = "kind-\(cfg.name)" 1230 "\(filepath)": { 1231 patches: cfg 1232 } 1233 } 1234 } 1235 files: { 1236 "\("kind-\(cfg.name)")": { 1237 patches: cfg 1238 } 1239 } 1240 incomplete: { 1241 a: { 1242 x: "a \(run.a) z" 1243 run: { 1244 a: string 1245 } 1246 } 1247 b: { 1248 let A = run.a 1249 x: "a \(A) z" 1250 run: { 1251 a: string 1252 } 1253 } 1254 c: { 1255 let A_1 = run.a 1256 let A_2 = run2.a 1257 x: "a \(A_1) z" 1258 run: { 1259 a: string 1260 } 1261 x2: "a \(A_2) z" 1262 run2: { 1263 a: string 1264 } 1265 } 1266 d: { 1267 let A_3 = run.a 1268 let A_4 = run2.a 1269 x: "a \(A_3) z" 1270 run: { 1271 a: string 1272 } 1273 x2: "a \(A_4) z" 1274 run2: { 1275 a: string 1276 } 1277 } 1278 } 1279 scoped: { 1280 _args: { 1281 required: 1 1282 } 1283 direct: { 1284 a: 1 1285 } 1286 embed1: { 1287 a: 1 1288 } 1289 embed2: { 1290 a: 1 1291 } 1292 list: { 1293 a: [1] 1294 } 1295 listStruct: { 1296 a: [{ 1297 a: 1 1298 }] 1299 } 1300 listEmbed: { 1301 a: [1] 1302 } 1303 } 1304 unresolvedDisjunction: { 1305 #TypePrimitive: { 1306 _args: { 1307 required: bool 1308 } 1309 "*": {} 1310 } 1311 #TypeBool: { 1312 let Args = _args 1313 _args: { 1314 required: bool 1315 } 1316 1317 if !Args.required { 1318 // `default` sets the default value. 1319 default: bool | null 1320 } 1321 } 1322 } 1323 x: "foo" 1324 y: "foo" 1325 } 1326 == Eval 1327 { 1328 #Foo: 2 1329 cfgs: [{ 1330 metadata: { 1331 name: "one" 1332 } 1333 }, { 1334 metadata: { 1335 name: "two" 1336 } 1337 }] 1338 complete: { 1339 x: "a foo z" 1340 run: { 1341 a: "foo" 1342 } 1343 } 1344 comprehension: { 1345 for cfg in [{ 1346 a: "one" 1347 }] { 1348 let filepath = "kind-\(cfg.name)" 1349 "\(filepath)": { 1350 patches: cfg 1351 } 1352 } 1353 } 1354 files: { 1355 "\("kind-\(cfg.name)")": { 1356 patches: cfg 1357 } 1358 } 1359 incomplete: { 1360 a: { 1361 x: "a \(run.a) z" 1362 run: { 1363 a: string 1364 } 1365 } 1366 b: { 1367 let A = run.a 1368 x: "a \(A) z" 1369 run: { 1370 a: string 1371 } 1372 } 1373 c: { 1374 let A_1 = run.a 1375 let A_2 = run2.a 1376 x: "a \(A_1) z" 1377 run: { 1378 a: string 1379 } 1380 x2: "a \(A_2) z" 1381 run2: { 1382 a: string 1383 } 1384 } 1385 d: { 1386 let A_3 = run.a 1387 let A_4 = run2.a 1388 x: "a \(A_3) z" 1389 run: { 1390 a: string 1391 } 1392 x2: "a \(A_4) z" 1393 run2: { 1394 a: string 1395 } 1396 } 1397 } 1398 scoped: { 1399 direct: { 1400 a: 1 1401 } 1402 embed1: { 1403 a: 1 1404 } 1405 embed2: { 1406 a: 1 1407 } 1408 list: { 1409 a: [1] 1410 } 1411 listStruct: { 1412 a: [{ 1413 a: 1 1414 }] 1415 } 1416 listEmbed: { 1417 a: [1] 1418 } 1419 } 1420 unresolvedDisjunction: { 1421 #TypePrimitive: { 1422 "*": {} 1423 } 1424 #TypeBool: { 1425 let Args = _args 1426 _args: { 1427 required: bool 1428 } 1429 1430 if !Args.required { 1431 default: bool | null 1432 } 1433 } 1434 } 1435 x: "foo" 1436 y: "foo" 1437 }