@@ -47,16 +47,49 @@ issue3581: reduced: {
47
47
list: ["\(c)" ]
48
48
c: _
49
49
}
50
+ -- issue3576.cue --
51
+ issue3576: reduced: {
52
+ #A: a!: string
53
+ #B: {
54
+ if false {
55
+ dummy: {}
56
+ }
57
+ }
58
+ foo: #B | #A
59
+ foo: a: "1"
60
+ }
61
+ issue3576: full: {
62
+ #Run: {
63
+ run!: string
64
+ options?: #Option | [#Option, ...]
65
+ if options != _|_ {
66
+ optionsValue: options
67
+ }
68
+ }
69
+
70
+ #Copy: {
71
+ copy!: string
72
+ options?: #Option | [#Option, ...]
73
+ if options != _|_ {
74
+ optionsValue: options
75
+ }
76
+ }
77
+
78
+ #Option: {}
79
+
80
+ foo: #Run | #Copy
81
+ foo: run: "make"
82
+ }
50
83
-- out/eval/stats --
51
84
Leaks: 0
52
- Freed: 65
53
- Reused: 56
54
- Allocs: 9
55
- Retain: 20
85
+ Freed: 109
86
+ Reused: 99
87
+ Allocs: 10
88
+ Retain: 21
56
89
57
- Unifications: 39
58
- Conjuncts: 96
59
- Disjuncts: 85
90
+ Unifications: 71
91
+ Conjuncts: 152
92
+ Disjuncts: 130
60
93
-- out/evalalpha --
61
94
Errors:
62
95
issue516.x: 2 errors in empty disjunction:
@@ -140,6 +173,64 @@ Result:
140
173
issue3157: (struct){
141
174
foo: ((bool|int)){ |((int){ 43 }, (bool){ bool }) }
142
175
}
176
+ issue3576: (struct){
177
+ reduced: (struct){
178
+ #A: (#struct){
179
+ a!: (string){ string }
180
+ }
181
+ #B: (#struct){
182
+ }
183
+ foo: (struct){ |((#struct){
184
+ a: (_|_){
185
+ // [eval] issue3576.reduced.foo.a: field not allowed:
186
+ // ./issue3576.cue:5:11
187
+ // ./issue3576.cue:9:7
188
+ }
189
+ }, (#struct){
190
+ a: (string){ "1" }
191
+ }) }
192
+ }
193
+ full: (struct){
194
+ #Run: (#struct){
195
+ run!: (string){ string }
196
+ options?: ((list|struct)){ |((#struct){
197
+ }, (list){
198
+ 0: (#struct){
199
+ }
200
+ }) }
201
+ }
202
+ #Copy: (#struct){
203
+ copy!: (string){ string }
204
+ options?: ((list|struct)){ |((#struct){
205
+ }, (list){
206
+ 0: (#struct){
207
+ }
208
+ }) }
209
+ }
210
+ #Option: (#struct){
211
+ }
212
+ foo: (struct){ |((#struct){
213
+ run: (string){ "make" }
214
+ options?: ((list|struct)){ |((#struct){
215
+ }, (list){
216
+ 0: (#struct){
217
+ }
218
+ }) }
219
+ }, (#struct){
220
+ run: (_|_){
221
+ // [eval] issue3576.full.foo.run: field not allowed:
222
+ // ./issue3576.cue:24:18
223
+ // ./issue3576.cue:31:7
224
+ }
225
+ copy!: (string){ string }
226
+ options?: ((list|struct)){ |((#struct){
227
+ }, (list){
228
+ 0: (#struct){
229
+ }
230
+ }) }
231
+ }) }
232
+ }
233
+ }
143
234
issue3581: (struct){
144
235
reduced: (struct){
145
236
list: (_|_){
@@ -224,7 +315,7 @@ diff old new
224
315
metrics: (struct){
225
316
foo: (struct){
226
317
}
227
- @@ -86,23 +74,21 @@
318
+ @@ -86,11 +74,11 @@
228
319
}
229
320
issue2916: (struct){
230
321
b: (struct){
@@ -236,7 +327,63 @@ diff old new
236
327
- foo: ((bool|int)){ |(*(int){ 43 }, (bool){ bool }) }
237
328
+ foo: ((bool|int)){ |((int){ 43 }, (bool){ bool }) }
238
329
}
330
+ issue3576: (struct){
331
+ reduced: (struct){
332
+ @@ -99,9 +87,15 @@
333
+ }
334
+ #B: (#struct){
335
+ }
336
+ - foo: (#struct){
337
+ - a: (string){ "1" }
338
+ - }
339
+ + foo: (struct){ |((#struct){
340
+ + a: (_|_){
341
+ + // [eval] issue3576.reduced.foo.a: field not allowed:
342
+ + // ./issue3576.cue:5:11
343
+ + // ./issue3576.cue:9:7
344
+ + }
345
+ + }, (#struct){
346
+ + a: (string){ "1" }
347
+ + }) }
348
+ }
349
+ full: (struct){
350
+ #Run: (#struct){
351
+ @@ -122,14 +116,26 @@
352
+ }
353
+ #Option: (#struct){
354
+ }
355
+ - foo: (#struct){
356
+ - run: (string){ "make" }
357
+ - options?: ((list|struct)){ |((#struct){
358
+ - }, (list){
359
+ - 0: (#struct){
360
+ - }
361
+ - }) }
362
+ - }
363
+ + foo: (struct){ |((#struct){
364
+ + run: (string){ "make" }
365
+ + options?: ((list|struct)){ |((#struct){
366
+ + }, (list){
367
+ + 0: (#struct){
368
+ + }
369
+ + }) }
370
+ + }, (#struct){
371
+ + run: (_|_){
372
+ + // [eval] issue3576.full.foo.run: field not allowed:
373
+ + // ./issue3576.cue:24:18
374
+ + // ./issue3576.cue:31:7
375
+ + }
376
+ + copy!: (string){ string }
377
+ + options?: ((list|struct)){ |((#struct){
378
+ + }, (list){
379
+ + 0: (#struct){
380
+ + }
381
+ + }) }
382
+ + }) }
383
+ }
384
+ }
239
385
issue3581: (struct){
386
+ @@ -136,13 +142,11 @@
240
387
reduced: (struct){
241
388
list: (_|_){
242
389
// [incomplete] issue3581.reduced.list: 2 errors in empty disjunction:
@@ -359,6 +506,46 @@ Result:
359
506
issue3157: (struct){
360
507
foo: ((bool|int)){ |(*(int){ 43 }, (bool){ bool }) }
361
508
}
509
+ issue3576: (struct){
510
+ reduced: (struct){
511
+ #A: (#struct){
512
+ a!: (string){ string }
513
+ }
514
+ #B: (#struct){
515
+ }
516
+ foo: (#struct){
517
+ a: (string){ "1" }
518
+ }
519
+ }
520
+ full: (struct){
521
+ #Run: (#struct){
522
+ run!: (string){ string }
523
+ options?: ((list|struct)){ |((#struct){
524
+ }, (list){
525
+ 0: (#struct){
526
+ }
527
+ }) }
528
+ }
529
+ #Copy: (#struct){
530
+ copy!: (string){ string }
531
+ options?: ((list|struct)){ |((#struct){
532
+ }, (list){
533
+ 0: (#struct){
534
+ }
535
+ }) }
536
+ }
537
+ #Option: (#struct){
538
+ }
539
+ foo: (#struct){
540
+ run: (string){ "make" }
541
+ options?: ((list|struct)){ |((#struct){
542
+ }, (list){
543
+ 0: (#struct){
544
+ }
545
+ }) }
546
+ }
547
+ }
548
+ }
362
549
issue3581: (struct){
363
550
reduced: (struct){
364
551
list: (_|_){
@@ -430,6 +617,54 @@ Result:
430
617
foo: (*43|bool)
431
618
}
432
619
}
620
+ --- issue3576.cue
621
+ {
622
+ issue3576: {
623
+ reduced: {
624
+ #A: {
625
+ a!: string
626
+ }
627
+ #B: {
628
+ if false {
629
+ dummy: {}
630
+ }
631
+ }
632
+ foo: (〈0;#B〉|〈0;#A〉)
633
+ foo: {
634
+ a: "1"
635
+ }
636
+ }
637
+ }
638
+ issue3576: {
639
+ full: {
640
+ #Run: {
641
+ run!: string
642
+ options?: (〈1;#Option〉|[
643
+ 〈2;#Option〉,
644
+ ...,
645
+ ])
646
+ if (〈0;options〉 != _|_(explicit error (_|_ literal) in source)) {
647
+ optionsValue: 〈1;options〉
648
+ }
649
+ }
650
+ #Copy: {
651
+ copy!: string
652
+ options?: (〈1;#Option〉|[
653
+ 〈2;#Option〉,
654
+ ...,
655
+ ])
656
+ if (〈0;options〉 != _|_(explicit error (_|_ literal) in source)) {
657
+ optionsValue: 〈1;options〉
658
+ }
659
+ }
660
+ #Option: {}
661
+ foo: (〈0;#Run〉|〈0;#Copy〉)
662
+ foo: {
663
+ run: "make"
664
+ }
665
+ }
666
+ }
667
+ }
433
668
--- issue3581.cue
434
669
{
435
670
issue3581: {
0 commit comments