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 --
5linkChildren: {
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
27fail: {
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
40embed: {
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.
106mixedFieldsSuccess: {
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.
139fieldMismatch: {
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.
150noStackOverflowStructCycle: {
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.
170provideIncompleteSuccess: {
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.
206voidArcs: {
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
234cyclicError: {
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
252midwayReferences: {
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.
266closedCheck: 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
282closedCheck: 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
298closedCheck: 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
316emptyComprehensionIncomplete: {
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.
327voidEliminationSuccess: t1: {
328 [string]: {
329 b: bool
330 if !b {}
331 }
332 if false {
333 a: b: true
334 }
335}
336
337voidEliminationSuccess: 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
366voidEliminationSuccess: 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
381voidEliminationSuccess: 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
397voidEliminationSuccess: 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
415voidEliminationSuccess: 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
433voidEliminationSuccess: 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
446voidEliminationSuccess: 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
459voidEliminationSuccess: 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
472voidEliminationSuccess: 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
485voidLookup: {
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).
510topElimination: {
511 a: int
512 _
513 if true {
514 x: a+1
515 }
516}
517
518voidEliminationSuccess: 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
533explicitDefaultError: {
534 a: string | *_|_
535
536 if a != "" {
537 }
538}
539
540// Remove arcs for with no for comprehension results.
541allArcsSuccess: p1: {
542 x: {
543 for k, _ in y {
544 (k): null
545 }
546 }
547 y: {
548 if false {
549 x: {}
550 }
551 }
552}
553
554allArcsSuccess: 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-- issue2208.cue --
568voidErrorIncomplete: {
569 #Schema: [string]: {
570 required: bool
571 if !required {
572 }
573 }
574
575 root: #Schema
576 root: {
577 if false {
578 child: required: false
579 }
580 }
581}
582
583// TODO: should these always be errors, or only for cue vet?
584// voidErrorFatal: pattern: {
585// #Schema: [string]: {
586// if "str" + 3 {
587// }
588// }
589//
590// root: #Schema
591// root: {
592// if false {
593// child: required: false
594// }
595// }
596// }
597//
598// voidErrorFatal: field: {
599// root: {
600// if false {
601// child: 2 + "str"
602// }
603// }
604// }
605
606
607-- issue1759.cue --
608// Tests derived from Unity.
609unity: success1: {
610 #Config: {
611 name: string
612 type: string
613 }
614
615 #AnyConfig: {
616 #Config
617 ...
618 }
619
620 #Env: {
621 name: string
622 configurations: [string]: #AnyConfig
623 }
624
625 envs: "e1": #Env & {
626 configurations: c1: #Config
627 }
628
629 envs: [string]: configurations: [string]: {
630 type: "foo"
631 if type == "terraform" {
632 backend: {
633 type: "s3"
634 }
635 }
636 }
637}
638
639issue1759: {
640 _ports_map: {}
641 if len(_ports_map) > 0 {
642 port: _ports_map.a.port
643 }
644 if true {
645 _ports_map: a: {port: "80"}
646 }
647}
648
649arcAlignment: t1: {
650 [string]: {
651 if true { }
652 }
653 if false {
654 c: _
655 }
656}
657
658-- issue2111.cue --
659// All arc types, not just regular fields, should be pushed down.
660letPushdown: {
661 _c: y: 1
662
663 a: {
664 for k, v in _c {
665 let x = v
666 if x != _|_ {
667 }
668 }
669 }
670}
671
672-- issue2113.cue --
673// Ensure that an enclosing Value clause of a nested comprehension is evaluated
674// before the nested comprehension itself is evaluated.
675nestedWithEmbeddingOK: {
676 c: [1]
677 a: {
678 for k, v in c {
679 {x: 1}
680 if a.x != _|_ {
681 }
682 }
683 }
684}
685
686nestedWithDynamicFieldOK: { // TODO(broken)
687 _c: y: 1
688
689 a: {
690 for k, v in _c {
691 if x != _|_ {
692 }
693 x="\(k)": 1
694 }
695 }
696}
697
698// Errors in nested comprehensions should also be reported.
699errorPropagation: {
700 deployment: _
701 for k, v in deployment {
702 for k1, v2 in v.env2 { // Report this error.
703 deployment: (k): x1: 1
704 }
705 }
706 for id in ["elem"] { deployment: (id): x2: 2 }
707}
708
709-- issue2131.cue --
710import "path"
711
712issue2131: tests: {
713 windows: {
714 eg1: in: #"c:\"#
715 eg2: in: #"c:\test"#
716 eg3: in: #"c:\test\"#
717 }
718
719 for os, examples in tests for k, v in examples {
720 (os): (k): out: "test"
721 }
722}
723
724-- reflect.cue --
725import "encoding/json"
726
727
728unifyDynamicReflectSuccess: {
729 for _, s in ["foo"] {
730 X: {...}
731 "\(s)": {
732 X: {...} // cannot be _
733 Y: json.Marshal(X) // cannot be yaml, X cannot be literal
734 }
735 }
736
737 [string]: X: {
738 if true {// must be there
739 x: y: {} // at least 2 nestings needed to expose problem
740 }
741 }
742}
743
744-- out/eval/stats --
745Leaks: 15
746Freed: 394
747Reused: 388
748Allocs: 21
749Retain: 108
750
751Unifications: 395
752Conjuncts: 640
753Disjuncts: 472
754-- out/eval --
755Errors:
756embed.fail1.p: field not allowed:
757 ./in.cue:37:9
758 ./in.cue:38:7
759 ./in.cue:45:3
760 ./in.cue:45:12
761 ./in.cue:46:4
762 ./in.cue:49:9
763embed.fail4.p: field not allowed:
764 ./in.cue:69:9
765 ./in.cue:70:7
766 ./in.cue:71:9
767 ./in.cue:72:3
768 ./in.cue:74:4
769noStackOverflowStructCycle.#list.tail: structural cycle
770noStackOverflowStructCycle.list.tail: structural cycle
771provideIncompleteSuccess.t2.a.c.d: field not allowed:
772 ./in.cue:187:7
773 ./in.cue:189:4
774 ./in.cue:190:8
775 ./in.cue:195:7
776fieldMismatch.a: cannot combine regular field "x" with 2:
777 ./in.cue:139:7
778 ./in.cue:137:3
779
780Result:
781(_|_){
782 // [eval]
783 linkChildren: (struct){
784 w: (int){ 1 }
785 v: (struct){
786 x: (int){ 1 }
787 y: (int){ 1 }
788 z: (int){ 1 }
789 rw: (int){ 1 }
790 rx: (int){ 1 }
791 ry: (int){ 1 }
792 rz: (int){ 1 }
793 n1a: (struct){
794 na: (#list){
795 0: (int){ 1 }
796 1: (int){ 1 }
797 2: (int){ 1 }
798 3: (int){ 1 }
799 }
800 }
801 n2a: (struct){
802 n1a: (struct){
803 na: (#list){
804 0: (int){ 1 }
805 1: (int){ 1 }
806 2: (int){ 1 }
807 3: (int){ 1 }
808 }
809 }
810 }
811 n2z: (struct){
812 n1z: (struct){
813 nz: (int){ 1 }
814 }
815 }
816 }
817 }
818 fail: (struct){
819 a: (_|_){
820 // [cycle] fail.a: cycle with field a.b:
821 // ./in.cue:30:6
822 }
823 }
824 embed: (_|_){
825 // [eval]
826 fail1: (_|_){
827 // [eval]
828 p: (_|_){
829 // [eval] embed.fail1.p: field not allowed:
830 // ./in.cue:37:9
831 // ./in.cue:38:7
832 // ./in.cue:45:3
833 // ./in.cue:45:12
834 // ./in.cue:46:4
835 // ./in.cue:49:9
836 }
837 }
838 #C1: (#struct){
839 }
840 success2: (#struct){
841 p: (string){ "foo" }
842 }
843 #C2: (#struct){
844 p: (_){ _ }
845 }
846 success3: (#struct){
847 }
848 #C3: (#struct){
849 }
850 fail4: (_|_){
851 // [eval]
852 p: (_|_){
853 // [eval] embed.fail4.p: field not allowed:
854 // ./in.cue:69:9
855 // ./in.cue:70:7
856 // ./in.cue:71:9
857 // ./in.cue:72:3
858 // ./in.cue:74:4
859 q: (int){ 1 }
860 }
861 }
862 #C4: (#struct){
863 }
864 incomplete5: (_|_){
865 // [incomplete] embed.incomplete5: incomplete bool: bool:
866 // ./in.cue:79:6
867 a: (bool){ bool }
868 }
869 incomplete6: (struct){
870 p: (_|_){
871 // [incomplete] embed.incomplete6.p: non-concrete value int in operand to +:
872 // ./in.cue:89:6
873 // ./in.cue:90:6
874 }
875 q: (int){ int }
876 }
877 incomplete7: (struct){
878 p: (_|_){
879 // [incomplete] embed.incomplete7.p: non-concrete value int in operand to +:
880 // ./in.cue:93:6
881 // ./in.cue:94:6
882 // ./in.cue:95:3
883 }
884 q: (int){ int }
885 }
886 }
887 mixedFieldsSuccess: (struct){
888 a: (struct){
889 X: (int){ 1 }
890 foo: (int){ 1 }
891 }
892 b: (struct){
893 #Def: (#struct){
894 X: (int){ 1 }
895 foo: (int){ 1 }
896 }
897 x: (#struct){
898 X: (int){ 1 }
899 foo: (int){ 1 }
900 }
901 }
902 c: (struct){
903 #Def: (#struct){
904 X: (int){ int }
905 foo: (int){ int }
906 }
907 x: (#struct){
908 X: (int){ 1 }
909 foo: (int){ 1 }
910 }
911 }
912 }
913 fieldMismatch: (_|_){
914 // [eval]
915 a: (_|_){
916 // [eval] fieldMismatch.a: cannot combine regular field "x" with 2:
917 // ./in.cue:139:7
918 // ./in.cue:137:3
919 x: (int){ 3 }
920 }
921 }
922 noStackOverflowStructCycle: (_|_){
923 // [structural cycle]
924 #list: (_|_){
925 // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle
926 tail: (_|_){
927 // [structural cycle] noStackOverflowStructCycle.#list.tail: structural cycle
928 }
929 }
930 list: (_|_){
931 // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle
932 tail: (_|_){
933 // [structural cycle] noStackOverflowStructCycle.list.tail: structural cycle
934 }
935 }
936 }
937 provideIncompleteSuccess: (_|_){
938 // [eval]
939 t1: (struct){
940 #a: (_|_){
941 // [incomplete] provideIncompleteSuccess.t1.#a: incomplete bool: bool:
942 // ./in.cue:172:7
943 b: (bool){ bool }
944 }
945 x: (#struct){
946 c: (int){ 4 }
947 b: (bool){ true }
948 }
949 y: (#struct){
950 c: (int){ 4 }
951 b: (bool){ true }
952 }
953 }
954 t2: (_|_){
955 // [eval]
956 #a: (#struct){
957 c: (int){ 4 }
958 b: (bool){ true }
959 }
960 #c: (#struct){
961 }
962 a: (_|_){
963 // [eval]
964 c: (_|_){
965 // [eval]
966 d: (_|_){
967 // [eval] provideIncompleteSuccess.t2.a.c.d: field not allowed:
968 // ./in.cue:187:7
969 // ./in.cue:189:4
970 // ./in.cue:190:8
971 // ./in.cue:195:7
972 }
973 }
974 b: (bool){ true }
975 }
976 }
977 }
978 voidArcs: (struct){
979 scopes: (struct){
980 x: (int){ 1 }
981 a: (struct){
982 y: (int){ 2 }
983 b: (int){ 1 }
984 c: (struct){
985 d: (int){ 1 }
986 }
987 e: (int){ 2 }
988 f: (struct){
989 g: (int){ 2 }
990 }
991 }
992 }
993 drop: (struct){
994 x: (int){ 1 }
995 a: (struct){
996 y: (int){ 2 }
997 }
998 }
999 }
1000 cyclicError: (struct){
1001 a: (_|_){
1002 // [cycle] cycle error
1003 x: (_|_){
1004 // [cycle] cycle error
1005 }
1006 y: (_|_){
1007 // [cycle] cycle error
1008 }
1009 b: (struct){
1010 }
1011 }
1012 c: (struct){
1013 }
1014 }
1015 midwayReferences: (struct){
1016 a: (struct){
1017 x: (struct){
1018 y: (struct){
1019 z: (struct){
1020 a: (int){ 1 }
1021 b: (int){ 2 }
1022 }
1023 }
1024 }
1025 }
1026 b: (struct){
1027 y: (struct){
1028 z: (struct){
1029 a: (int){ 1 }
1030 b: (int){ 2 }
1031 }
1032 }
1033 }
1034 c: (struct){
1035 z: (struct){
1036 a: (int){ 1 }
1037 b: (int){ 2 }
1038 }
1039 }
1040 d: (struct){
1041 a: (int){ 1 }
1042 b: (int){ 2 }
1043 }
1044 }
1045 closedCheck: (struct){
1046 success1: (struct){
1047 a: (struct){
1048 b: (struct){
1049 c: (#struct){
1050 d: (string){ "d" }
1051 e: (string){ "ok" }
1052 }
1053 }
1054 }
1055 #D: (_|_){
1056 // [incomplete] closedCheck.success1.#D: non-concrete value string in operand to !=:
1057 // ./in.cue:267:6
1058 // ./in.cue:266:6
1059 d: (string){ string }
1060 }
1061 }
1062 success2: (struct){
1063 a: (struct){
1064 b: (struct){
1065 c: (#struct){
1066 d: (string){ "d" }
1067 foobar: (string){ "ok" }
1068 }
1069 }
1070 }
1071 #D: (_|_){
1072 // [incomplete] closedCheck.success2.#D: non-concrete value string in operand to !=:
1073 // ./in.cue:283:6
1074 // ./in.cue:282:6
1075 d: (string){ string }
1076 }
1077 }
1078 success3: (struct){
1079 a: (struct){
1080 b: (struct){
1081 c: (#struct){
1082 d: (string){ "d" }
1083 e: (string){ "ok" }
1084 }
1085 }
1086 }
1087 #D: (#struct){
1088 d: (string){ string }
1089 e: (_|_){
1090 // [incomplete] closedCheck.success3.#D.e: non-concrete value string in operand to !=:
1091 // ./in.cue:300:7
1092 // ./in.cue:298:6
1093 }
1094 }
1095 }
1096 }
1097 emptyComprehensionIncomplete: (struct){
1098 a: (struct){
1099 }
1100 b: (_|_){
1101 // [incomplete] emptyComprehensionIncomplete.b: undefined field: b:
1102 // ./in.cue:316:8
1103 }
1104 }
1105 voidEliminationSuccess: (struct){
1106 t1: (struct){
1107 }
1108 t2: (struct){
1109 components: (struct){
1110 sinks: (struct){
1111 blah: (#struct){
1112 kind: (string){ "source" }
1113 configuration: (#struct){
1114 }
1115 }
1116 }
1117 #C: (#struct){
1118 kind: (string){ string }
1119 configuration: (#struct){
1120 }
1121 }
1122 }
1123 }
1124 derefRef1: (struct){
1125 a: (struct){
1126 b: (struct){
1127 c: (struct){
1128 }
1129 }
1130 }
1131 E: (struct){
1132 e: (bool){ bool }
1133 f: (_|_){
1134 // [incomplete] voidEliminationSuccess.derefRef1.E.f: operand e of '!' not concrete (was bool):
1135 // ./in.cue:373:7
1136 }
1137 }
1138 }
1139 derefRef2: (struct){
1140 a: (struct){
1141 b: (struct){
1142 c: (struct){
1143 }
1144 }
1145 }
1146 E: (#struct){
1147 e: (bool){ bool }
1148 f: (_|_){
1149 // [incomplete] voidEliminationSuccess.derefRef2.E.f: operand e of '!' not concrete (was bool):
1150 // ./in.cue:389:7
1151 }
1152 }
1153 #F: (#struct){
1154 e: (bool){ bool }
1155 f: (_|_){
1156 // [incomplete] voidEliminationSuccess.derefRef2.#F.f: operand e of '!' not concrete (was bool):
1157 // ./in.cue:389:7
1158 }
1159 }
1160 }
1161 derefDisj1: (struct){
1162 a: (struct){
1163 b: (struct){
1164 c: (struct){
1165 }
1166 }
1167 }
1168 E: (_|_){
1169 // [incomplete] voidEliminationSuccess.derefDisj1.E: 2 errors in empty disjunction::
1170 // ./in.cue:394:28
1171 // voidEliminationSuccess.derefDisj1.E.f: operand e of '!' not concrete (was bool):
1172 // ./in.cue:404:7
1173 // voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool):
1174 // ./in.cue:407:7
1175 g: (bool){ bool }
1176 h: (_|_){
1177 // [incomplete] voidEliminationSuccess.derefDisj1.E.h: operand g of '!' not concrete (was bool):
1178 // ./in.cue:407:7
1179 }
1180 }
1181 }
1182 derefDisj2: (struct){
1183 a: (struct){
1184 b: (struct){
1185 c: (struct){
1186 }
1187 }
1188 }
1189 E: (_|_){
1190 // [incomplete] voidEliminationSuccess.derefDisj2.E: 2 errors in empty disjunction::
1191 // ./in.cue:412:28
1192 // voidEliminationSuccess.derefDisj2.E.f: operand e of '!' not concrete (was bool):
1193 // ./in.cue:422:7
1194 // voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool):
1195 // ./in.cue:425:7
1196 g: (bool){ bool }
1197 h: (_|_){
1198 // [incomplete] voidEliminationSuccess.derefDisj2.E.h: operand g of '!' not concrete (was bool):
1199 // ./in.cue:425:7
1200 }
1201 }
1202 }
1203 bulk1: (struct){
1204 a: (struct){
1205 b: (struct){
1206 c: (struct){
1207 e: (string){ string }
1208 }
1209 d: (string){ string }
1210 }
1211 }
1212 }
1213 opt1: (struct){
1214 a: (struct){
1215 b: (struct){
1216 c: (struct){
1217 e: (string){ string }
1218 }
1219 d: (string){ string }
1220 }
1221 }
1222 }
1223 noCycle1: (struct){
1224 _x: (struct){
1225 }
1226 a: (struct){
1227 c: (struct){
1228 h: (string){ "stream" }
1229 }
1230 b: (struct){
1231 }
1232 }
1233 }
1234 noCycle2: (struct){
1235 a: (struct){
1236 c: (struct){
1237 h: (string){ "stream" }
1238 }
1239 b: (struct){
1240 }
1241 }
1242 _x: (struct){
1243 }
1244 }
1245 drop1: (struct){
1246 t: (struct){
1247 #ok: (bool){ |(*(bool){ true }, (bool){ bool }) }
1248 x: (int){ int }
1249 }
1250 s: (struct){
1251 #ok: (bool){ false }
1252 }
1253 }
1254 }
1255 voidLookup: (struct){
1256 a: (struct){
1257 x: (struct){
1258 z: (_|_){
1259 // [incomplete] voidLookup.a.x.z: undefined field: void:
1260 // ./in.cue:482:17
1261 }
1262 c: (_|_){
1263 // [incomplete] voidLookup.a.x.z: undefined field: void:
1264 // ./in.cue:482:17
1265 }
1266 }
1267 y: (struct){
1268 c: (_){ _ }
1269 z: (struct){
1270 }
1271 }
1272 }
1273 }
1274 topElimination: (struct){
1275 a: (int){ int }
1276 x: (_|_){
1277 // [incomplete] topElimination.x: non-concrete value int in operand to +:
1278 // ./in.cue:510:6
1279 // ./in.cue:507:5
1280 }
1281 }
1282 explicitDefaultError: (_|_){
1283 // [incomplete] explicitDefaultError: non-concrete value string in operand to !=:
1284 // ./in.cue:532:5
1285 // ./in.cue:530:5
1286 a: (string){ string }
1287 }
1288 allArcsSuccess: (struct){
1289 p1: (struct){
1290 x: (struct){
1291 }
1292 y: (struct){
1293 }
1294 }
1295 p2: (struct){
1296 y: (struct){
1297 }
1298 x: (struct){
1299 }
1300 }
1301 }
1302 unity: (struct){
1303 success1: (struct){
1304 #Config: (#struct){
1305 name: (string){ string }
1306 type: (string){ string }
1307 }
1308 #AnyConfig: (#struct){
1309 name: (string){ string }
1310 type: (string){ string }
1311 }
1312 #Env: (#struct){
1313 name: (string){ string }
1314 configurations: (#struct){
1315 }
1316 }
1317 envs: (struct){
1318 e1: (#struct){
1319 name: (string){ string }
1320 configurations: (#struct){
1321 c1: (#struct){
1322 name: (string){ string }
1323 type: (string){ "foo" }
1324 }
1325 }
1326 }
1327 }
1328 }
1329 }
1330 issue1759: (struct){
1331 _ports_map: (struct){
1332 a: (struct){
1333 port: (string){ "80" }
1334 }
1335 }
1336 port: (string){ "80" }
1337 }
1338 arcAlignment: (struct){
1339 t1: (struct){
1340 }
1341 }
1342 letPushdown: (struct){
1343 _c: (struct){
1344 y: (int){ 1 }
1345 }
1346 a: (struct){
1347 let x#1multi = 〈1;v〉
1348 }
1349 }
1350 nestedWithEmbeddingOK: (struct){
1351 c: (#list){
1352 0: (int){ 1 }
1353 }
1354 a: (struct){
1355 x: (int){ 1 }
1356 }
1357 }
1358 nestedWithDynamicFieldOK: (struct){
1359 _c: (struct){
1360 y: (int){ 1 }
1361 }
1362 a: (_|_){
1363 // [cycle] nestedWithDynamicFieldOK.a: circular dependency in evaluation of conditionals: "\(〈1;k〉)" changed after evaluation:
1364 // ./issue2113.cue:19:7
1365 y: (int){ 1 }
1366 }
1367 }
1368 errorPropagation: (_|_){
1369 // [incomplete] errorPropagation: undefined field: env2:
1370 // ./issue2113.cue:30:19
1371 deployment: (_|_){
1372 // [incomplete] errorPropagation: undefined field: env2:
1373 // ./issue2113.cue:30:19
1374 elem: (struct){
1375 x2: (int){ 2 }
1376 }
1377 }
1378 }
1379 issue2131: (struct){
1380 tests: (struct){
1381 windows: (struct){
1382 eg1: (struct){
1383 in: (string){ "c:\\" }
1384 out: (string){ "test" }
1385 }
1386 eg2: (struct){
1387 in: (string){ "c:\\test" }
1388 out: (string){ "test" }
1389 }
1390 eg3: (struct){
1391 in: (string){ "c:\\test\\" }
1392 out: (string){ "test" }
1393 }
1394 }
1395 }
1396 }
1397 voidErrorIncomplete: (struct){
1398 #Schema: (#struct){
1399 }
1400 root: (#struct){
1401 }
1402 }
1403 unifyDynamicReflectSuccess: (struct){
1404 X: (struct){
1405 X: (struct){
1406 x: (struct){
1407 y: (struct){
1408 }
1409 }
1410 }
1411 }
1412 foo: (struct){
1413 X: (struct){
1414 x: (struct){
1415 y: (struct){
1416 }
1417 }
1418 }
1419 Y: (string){ "{\"x\":{\"y\":{}}}" }
1420 }
1421 }
1422}
1423-- out/compile --
1424--- in.cue
1425{
1426 linkChildren: {
1427 w: 1
1428 v: {
1429 x: 1
1430 if true {
1431 y: 1
1432 if true {
1433 z: 1
1434 rw: 〈3;w〉
1435 rx: 〈2;x〉
1436 ry: 〈1;y〉
1437 rz: 〈0;z〉
1438 n1a: {
1439 na: [
1440 〈5;w〉,
1441 〈4;x〉,
1442 〈3;y〉,
1443 〈2;z〉,
1444 ]
1445 }
1446 n2a: {
1447 n1a: {
1448 na: [
1449 〈6;w〉,
1450 〈5;x〉,
1451 〈4;y〉,
1452 〈3;z〉,
1453 ]
1454 }
1455 }
1456 n2z: {
1457 n1z: {
1458 nz: 〈2;z〉
1459 }
1460 }
1461 }
1462 }
1463 }
1464 }
1465 fail: {
1466 a: {
1467 if (〈1;a〉.b == _|_(explicit error (_|_ literal) in source)) {
1468 b: 1
1469 }
1470 }
1471 }
1472 embed: {
1473 fail1: 〈0;#C1〉
1474 #C1: {
1475 if false {
1476 p: _
1477 }
1478 }
1479 fail1: {
1480 p: "foo"
1481 }
1482 success2: 〈0;#C2〉
1483 #C2: {
1484 if true {
1485 p: _
1486 }
1487 }
1488 success2: {
1489 p: "foo"
1490 }
1491 success3: 〈0;#C3〉
1492 #C3: {}
1493 success3: {
1494 if false {
1495 p: {
1496 q: 1
1497 }
1498 }
1499 }
1500 fail4: 〈0;#C4〉
1501 #C4: {}
1502 fail4: {
1503 if true {
1504 p: {
1505 q: 1
1506 }
1507 }
1508 }
1509 incomplete5: {
1510 a: bool
1511 if 〈0;a〉 {
1512 p: {
1513 q: 1
1514 }
1515 }
1516 }
1517 incomplete6: {
1518 if false {
1519 p: 1
1520 }
1521 p: (〈0;q〉 + 1)
1522 q: int
1523 }
1524 incomplete7: {
1525 p: (〈0;q〉 + 1)
1526 q: int
1527 if false {
1528 q: 1
1529 }
1530 }
1531 }
1532 mixedFieldsSuccess: {
1533 a: {
1534 for _, s in [
1535 "foo",
1536 ] {
1537 "\(〈1;s〉)": 1
1538 X: 1
1539 }
1540 }
1541 b: {
1542 #Def: {
1543 for _, s in [
1544 "foo",
1545 ] {
1546 "\(〈1;s〉)": 1
1547 X: 1
1548 }
1549 }
1550 }
1551 b: {
1552 x: 〈1;b〉.#Def
1553 }
1554 b: {
1555 x: {
1556 X: _
1557 }
1558 }
1559 b: {
1560 x: {
1561 foo: _
1562 }
1563 }
1564 c: {
1565 #Def: {
1566 X: int
1567 foo: int
1568 }
1569 }
1570 c: {
1571 x: 〈1;c〉.#Def
1572 }
1573 c: {
1574 x: {
1575 for _, s in [
1576 "foo",
1577 ] {
1578 "\(〈1;s〉)": 1
1579 X: 1
1580 }
1581 }
1582 }
1583 }
1584 fieldMismatch: {
1585 a: {
1586 2
1587 if true {
1588 x: 3
1589 }
1590 }
1591 }
1592 noStackOverflowStructCycle: {
1593 #list: {
1594 tail: 〈1;#list〉
1595 if (〈0;tail〉 != null) {
1596 sum: 〈1;tail〉.sum
1597 }
1598 }
1599 list: {
1600 tail: 〈1;list〉
1601 if (〈0;tail〉 != null) {
1602 sum: 〈1;tail〉.sum
1603 }
1604 }
1605 }
1606 provideIncompleteSuccess: {
1607 t1: {
1608 #a: {
1609 if 〈0;b〉 {
1610 c: 4
1611 }
1612 b: bool
1613 }
1614 x: ((〈0;#a〉 & {
1615 b: true
1616 }) & {
1617 c: 4
1618 })
1619 y: 〈0;x〉
1620 }
1621 t2: {
1622 #a: {
1623 if 〈0;b〉 {
1624 c: 4
1625 }
1626 b: true
1627 }
1628 #c: {}
1629 a: {
1630 if 〈0;b〉 {
1631 c: {
1632 d: 4
1633 }
1634 }
1635 b: true
1636 c: 〈1;#c〉
1637 }
1638 }
1639 }
1640 voidArcs: {
1641 scopes: {
1642 x: 1
1643 a: {
1644 y: 2
1645 if true {
1646 b: 〈2;x〉
1647 c: {
1648 d: 〈3;x〉
1649 }
1650 e: 〈1;y〉
1651 f: {
1652 g: 〈2;y〉
1653 }
1654 }
1655 }
1656 }
1657 drop: {
1658 x: 1
1659 a: {
1660 y: 2
1661 if false {
1662 b: 〈2;x〉
1663 c: {
1664 d: 〈3;x〉
1665 }
1666 e: 〈1;y〉
1667 f: {
1668 g: 〈2;y〉
1669 }
1670 }
1671 }
1672 }
1673 }
1674 cyclicError: {
1675 a: {
1676 x: bool
1677 y: bool
1678 if 〈1;a〉.x {
1679 y: true
1680 }
1681 if 〈1;a〉.y {
1682 x: true
1683 }
1684 b: {}
1685 }
1686 c: 〈0;a〉.b
1687 }
1688 midwayReferences: {
1689 a: {
1690 for i, j in {
1691 a: 1
1692 b: 2
1693 } {
1694 x: {
1695 y: {
1696 z: {
1697 〈4;i〉: 〈4;j〉
1698 }
1699 }
1700 }
1701 }
1702 x: {
1703 y: {}
1704 }
1705 }
1706 b: 〈0;a〉.x
1707 c: 〈0;a〉.x.y
1708 d: 〈0;a〉.x.y.z
1709 }
1710 closedCheck: {
1711 success1: {
1712 a: {
1713 b: {
1714 [string]: 〈2;#D〉
1715 }
1716 }
1717 #D: {
1718 d: string
1719 if (〈0;d〉 != "c") {
1720 e: string
1721 }
1722 }
1723 a: {
1724 b: {
1725 c: {
1726 d: "d"
1727 e: "ok"
1728 }
1729 }
1730 }
1731 }
1732 }
1733 closedCheck: {
1734 success2: {
1735 a: {
1736 b: {
1737 [string]: 〈2;#D〉
1738 }
1739 }
1740 #D: {
1741 d: string
1742 if (〈0;d〉 != "c") {
1743 ("foo" + "bar"): string
1744 }
1745 }
1746 a: {
1747 b: {
1748 c: {
1749 d: "d"
1750 foobar: "ok"
1751 }
1752 }
1753 }
1754 }
1755 }
1756 closedCheck: {
1757 success3: {
1758 a: {
1759 b: {
1760 [string]: 〈2;#D〉
1761 }
1762 }
1763 #D: {
1764 d: string
1765 e: {
1766 if (〈1;d〉 != "c") {
1767 string
1768 }
1769 }
1770 }
1771 a: {
1772 b: {
1773 c: {
1774 d: "d"
1775 e: "ok"
1776 }
1777 }
1778 }
1779 }
1780 }
1781 emptyComprehensionIncomplete: {
1782 a: {}
1783 b: {
1784 if 〈1;a〉.b {}
1785 }
1786 }
1787 voidEliminationSuccess: {
1788 t1: {
1789 [string]: {
1790 b: bool
1791 if !〈0;b〉 {}
1792 }
1793 if false {
1794 a: {
1795 b: true
1796 }
1797 }
1798 }
1799 }
1800 voidEliminationSuccess: {
1801 t2: {
1802 components: {
1803 sinks: {
1804 [string]: (〈1;#C〉 & {
1805 kind: string
1806 configuration: {
1807 if (〈1;kind〉 != "source") {
1808 inputs: {
1809 required: true
1810 }
1811 }
1812 }
1813 })
1814 }
1815 #C: {
1816 kind: string
1817 configuration: {
1818 [string]: {
1819 required: bool
1820 if !〈0;required〉 {
1821 common: bool
1822 }
1823 }
1824 }
1825 }
1826 }
1827 components: {
1828 sinks: {
1829 blah: {
1830 kind: "source"
1831 }
1832 }
1833 }
1834 }
1835 }
1836 voidEliminationSuccess: {
1837 derefRef1: {
1838 a: {
1839 [string]: {
1840 c: {
1841 [string]: 〈3;E〉
1842 }
1843 }
1844 }
1845 a: {
1846 b: {
1847 c: {
1848 if false {
1849 d: {
1850 e: true
1851 }
1852 }
1853 }
1854 }
1855 }
1856 E: {
1857 e: bool
1858 f: !〈0;e〉
1859 }
1860 }
1861 }
1862 voidEliminationSuccess: {
1863 derefRef2: {
1864 a: {
1865 [string]: {
1866 c: {
1867 [string]: 〈3;E〉
1868 }
1869 }
1870 }
1871 a: {
1872 b: {
1873 c: {
1874 if false {
1875 d: {
1876 e: true
1877 }
1878 }
1879 }
1880 }
1881 }
1882 E: 〈0;#F〉
1883 #F: {
1884 e: bool
1885 f: !〈0;e〉
1886 }
1887 }
1888 }
1889 voidEliminationSuccess: {
1890 derefDisj1: {
1891 a: {
1892 [string]: {
1893 c: {
1894 [string]: 〈3;E〉
1895 }
1896 }
1897 }
1898 a: {
1899 b: {
1900 c: {
1901 if false {
1902 d: {
1903 e: true
1904 }
1905 }
1906 }
1907 }
1908 }
1909 E: ({
1910 e: bool
1911 f: !〈0;e〉
1912 }|{
1913 g: bool
1914 h: !〈0;g〉
1915 })
1916 }
1917 }
1918 voidEliminationSuccess: {
1919 derefDisj2: {
1920 a: {
1921 [string]: {
1922 c: {
1923 [string]: (〈3;E〉 & 〈3;E〉)
1924 }
1925 }
1926 }
1927 a: {
1928 b: {
1929 c: {
1930 if false {
1931 d: {
1932 e: true
1933 }
1934 }
1935 }
1936 }
1937 }
1938 E: ({
1939 e: bool
1940 f: !〈0;e〉
1941 }|{
1942 g: bool
1943 h: !〈0;g〉
1944 })
1945 }
1946 }
1947 voidEliminationSuccess: {
1948 bulk1: {
1949 a: {
1950 b: {}
1951 }
1952 a: {
1953 [string]: {
1954 c: {
1955 e: string
1956 if false {
1957 e: ""
1958 }
1959 }
1960 d: 〈0;c〉.e
1961 }
1962 }
1963 }
1964 }
1965 voidEliminationSuccess: {
1966 opt1: {
1967 a: {
1968 b: {}
1969 }
1970 a: {
1971 b?: {
1972 c: {
1973 e: string
1974 if false {
1975 e: ""
1976 }
1977 }
1978 d: 〈0;c〉.e
1979 }
1980 }
1981 }
1982 }
1983 voidEliminationSuccess: {
1984 noCycle1: {
1985 _x: 〈0;a〉.b
1986 a: {
1987 c: {
1988 h: "stream"
1989 }
1990 b: {
1991 if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {}
1992 }
1993 c: {
1994 if false {
1995 g: _
1996 }
1997 }
1998 }
1999 }
2000 }
2001 voidEliminationSuccess: {
2002 noCycle2: {
2003 a: {
2004 c: {
2005 h: "stream"
2006 }
2007 b: {
2008 if (〈1;c〉.g != _|_(explicit error (_|_ literal) in source)) {}
2009 }
2010 c: {
2011 if false {
2012 g: _
2013 }
2014 }
2015 }
2016 _x: 〈0;a〉.b
2017 }
2018 }
2019 voidLookup: {
2020 a: {
2021 x: {
2022 z: 〈2;a〉.y.z.void
2023 }
2024 }
2025 a: {
2026 y: {
2027 c: _
2028 z: {}
2029 }
2030 }
2031 a: {
2032 [string]: {
2033 c: {
2034 for k, v in 〈1;z〉 {
2035 〈1;k〉: null
2036 }
2037 }
2038 z: {
2039 if false {
2040 err: {}
2041 }
2042 }
2043 }
2044 }
2045 }
2046 topElimination: {
2047 a: int
2048 _
2049 if true {
2050 x: (〈1;a〉 + 1)
2051 }
2052 }
2053 voidEliminationSuccess: {
2054 drop1: {
2055 t: {
2056 #ok: (*true|bool)
2057 if 〈0;#ok〉 {
2058 x: int
2059 }
2060 }
2061 s: (〈0;t〉 & {
2062 #ok: false
2063 })
2064 }
2065 }
2066 explicitDefaultError: {
2067 a: (string|*_|_(explicit error (_|_ literal) in source))
2068 if (〈0;a〉 != "") {}
2069 }
2070 allArcsSuccess: {
2071 p1: {
2072 x: {
2073 for k, _ in 〈1;y〉 {
2074 〈1;k〉: null
2075 }
2076 }
2077 y: {
2078 if false {
2079 x: {}
2080 }
2081 }
2082 }
2083 }
2084 allArcsSuccess: {
2085 p2: {
2086 y: {
2087 if false {
2088 x: {}
2089 }
2090 }
2091 x: {
2092 for k, _ in 〈1;y〉 {
2093 〈1;k〉: null
2094 }
2095 }
2096 }
2097 }
2098}
2099--- issue1759.cue
2100{
2101 unity: {
2102 success1: {
2103 #Config: {
2104 name: string
2105 type: string
2106 }
2107 #AnyConfig: {
2108 〈1;#Config〉
2109 ...
2110 }
2111 #Env: {
2112 name: string
2113 configurations: {
2114 [string]: 〈2;#AnyConfig〉
2115 }
2116 }
2117 envs: {
2118 e1: (〈1;#Env〉 & {
2119 configurations: {
2120 c1: 〈3;#Config〉
2121 }
2122 })
2123 }
2124 envs: {
2125 [string]: {
2126 configurations: {
2127 [string]: {
2128 type: "foo"
2129 if (〈0;type〉 == "terraform") {
2130 backend: {
2131 type: "s3"
2132 }
2133 }
2134 }
2135 }
2136 }
2137 }
2138 }
2139 }
2140 issue1759: {
2141 _ports_map: {}
2142 if (len(〈0;_ports_map〉) > 0) {
2143 port: 〈1;_ports_map〉.a.port
2144 }
2145 if true {
2146 _ports_map: {
2147 a: {
2148 port: "80"
2149 }
2150 }
2151 }
2152 }
2153 arcAlignment: {
2154 t1: {
2155 [string]: {
2156 if true {}
2157 }
2158 if false {
2159 c: _
2160 }
2161 }
2162 }
2163}
2164--- issue2111.cue
2165{
2166 letPushdown: {
2167 _c: {
2168 y: 1
2169 }
2170 a: {
2171 for k, v in 〈1;_c〉 {
2172 let x#1multi = 〈1;v〉
2173 if (〈0;let x#1〉 != _|_(explicit error (_|_ literal) in source)) {}
2174 }
2175 }
2176 }
2177}
2178--- issue2113.cue
2179{
2180 nestedWithEmbeddingOK: {
2181 c: [
2182 1,
2183 ]
2184 a: {
2185 for k, v in 〈1;c〉 {
2186 {
2187 x: 1
2188 }
2189 if (〈3;a〉.x != _|_(explicit error (_|_ literal) in source)) {}
2190 }
2191 }
2192 }
2193 nestedWithDynamicFieldOK: {
2194 _c: {
2195 y: 1
2196 }
2197 a: {
2198 for k, v in 〈1;_c〉 {
2199 if (〈0;("\(〈1;k〉)")〉 != _|_(explicit error (_|_ literal) in source)) {}
2200 "\(〈1;k〉)": 1
2201 }
2202 }
2203 }
2204 errorPropagation: {
2205 deployment: _
2206 for k, v in 〈0;deployment〉 {
2207 for k1, v2 in 〈1;v〉.env2 {
2208 deployment: {
2209 〈4;k〉: {
2210 x1: 1
2211 }
2212 }
2213 }
2214 }
2215 for _, id in [
2216 "elem",
2217 ] {
2218 deployment: {
2219 〈2;id〉: {
2220 x2: 2
2221 }
2222 }
2223 }
2224 }
2225}
2226--- issue2131.cue
2227{
2228 issue2131: {
2229 tests: {
2230 windows: {
2231 eg1: {
2232 in: "c:\\"
2233 }
2234 eg2: {
2235 in: "c:\\test"
2236 }
2237 eg3: {
2238 in: "c:\\test\\"
2239 }
2240 }
2241 for os, examples in 〈1;tests〉 for k, v in 〈0;examples〉 {
2242 〈2;os〉: {
2243 〈2;k〉: {
2244 out: "test"
2245 }
2246 }
2247 }
2248 }
2249 }
2250}
2251--- issue2208.cue
2252{
2253 voidErrorIncomplete: {
2254 #Schema: {
2255 [string]: {
2256 required: bool
2257 if !〈0;required〉 {}
2258 }
2259 }
2260 root: 〈0;#Schema〉
2261 root: {
2262 if false {
2263 child: {
2264 required: false
2265 }
2266 }
2267 }
2268 }
2269}
2270--- reflect.cue
2271{
2272 unifyDynamicReflectSuccess: {
2273 for _, s in [
2274 "foo",
2275 ] {
2276 X: {
2277 ...
2278 }
2279 "\(〈1;s〉)": {
2280 X: {
2281 ...
2282 }
2283 Y: 〈import;"encoding/json"〉.Marshal(〈0;X〉)
2284 }
2285 }
2286 [string]: {
2287 X: {
2288 if true {
2289 x: {
2290 y: {}
2291 }
2292 }
2293 }
2294 }
2295 }
2296}
View as plain text