@@ -121,6 +121,25 @@ issue3546: reduced: {
121
121
out: #Network
122
122
out: val
123
123
}
124
+ -- sharecycle.cue --
125
+ shareCycle: t1: {
126
+ #X: {}
127
+ Y: {
128
+ x: #X & Y
129
+ }
130
+ }
131
+ shareCycle: t2: {
132
+ #X: int
133
+ Y: {
134
+ x: #X & Y
135
+ }
136
+ }
137
+ shareCycle: t3: {
138
+ #X: {}
139
+ Y: {
140
+ x: Y & #X
141
+ }
142
+ }
124
143
-- acrossdisjunction.cue --
125
144
import "list"
126
145
@@ -133,16 +152,32 @@ issue3679: {
133
152
}
134
153
-- out/eval/stats --
135
154
Leaks: 3
136
- Freed: 158
137
- Reused: 151
155
+ Freed: 174
156
+ Reused: 167
138
157
Allocs: 10
139
158
Retain: 21
140
159
141
- Unifications: 159
142
- Conjuncts: 331
143
- Disjuncts: 177
160
+ Unifications: 175
161
+ Conjuncts: 365
162
+ Disjuncts: 193
144
163
-- out/evalalpha --
145
- (struct){
164
+ Errors:
165
+ shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
166
+ ./sharecycle.cue:8:6
167
+ ./sharecycle.cue:9:5
168
+ shareCycle.t1.Y.x.x: field not allowed:
169
+ ./sharecycle.cue:4:11
170
+ ./sharecycle.cue:4:3
171
+ shareCycle.t2.Y.x.x: field not allowed:
172
+ ./sharecycle.cue:10:11
173
+ ./sharecycle.cue:10:3
174
+ shareCycle.t3.Y.x.x: field not allowed:
175
+ ./sharecycle.cue:16:10
176
+ ./sharecycle.cue:16:3
177
+
178
+ Result:
179
+ (_|_){
180
+ // [eval]
146
181
issue3679: (struct){
147
182
b: (#list){
148
183
0: (string){ "bar" }
@@ -369,12 +404,87 @@ Disjuncts: 177
369
404
}
370
405
}
371
406
}
407
+ shareCycle: (_|_){
408
+ // [eval]
409
+ t1: (_|_){
410
+ // [eval]
411
+ #X: (#struct){
412
+ }
413
+ Y: (_|_){
414
+ // [eval]
415
+ x: (_|_){
416
+ // [eval]
417
+ x: (_|_){
418
+ // [eval] shareCycle.t1.Y.x.x: field not allowed:
419
+ // ./sharecycle.cue:4:11
420
+ // ./sharecycle.cue:4:3
421
+ }
422
+ }
423
+ }
424
+ }
425
+ t2: (_|_){
426
+ // [eval]
427
+ #X: (int){ int }
428
+ Y: (_|_){
429
+ // [eval]
430
+ x: (_|_){
431
+ // [eval] shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
432
+ // ./sharecycle.cue:8:6
433
+ // ./sharecycle.cue:9:5
434
+ // shareCycle.t2.Y.x.x: field not allowed:
435
+ // ./sharecycle.cue:10:11
436
+ // ./sharecycle.cue:10:3
437
+ x: (_|_){
438
+ // [eval] shareCycle.t2.Y.x.x: field not allowed:
439
+ // ./sharecycle.cue:10:11
440
+ // ./sharecycle.cue:10:3
441
+ }
442
+ }
443
+ }
444
+ }
445
+ t3: (_|_){
446
+ // [eval]
447
+ #X: (#struct){
448
+ }
449
+ Y: (_|_){
450
+ // [eval]
451
+ x: (_|_){
452
+ // [eval]
453
+ x: (_|_){
454
+ // [eval] shareCycle.t3.Y.x.x: field not allowed:
455
+ // ./sharecycle.cue:16:10
456
+ // ./sharecycle.cue:16:3
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
372
462
}
373
463
-- diff/-out/evalalpha<==>+out/eval --
374
464
diff old new
375
465
--- old
376
466
+++ new
377
- @@ -16,102 +16,75 @@
467
+ @@ -1,11 +1,16 @@
468
+ Errors:
469
+ -shareCycle.t1.Y.x.x: structural cycle
470
+ shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
471
+ ./sharecycle.cue:8:6
472
+ ./sharecycle.cue:9:5
473
+ +shareCycle.t1.Y.x.x: field not allowed:
474
+ + ./sharecycle.cue:4:11
475
+ + ./sharecycle.cue:4:3
476
+ +shareCycle.t2.Y.x.x: field not allowed:
477
+ ./sharecycle.cue:10:11
478
+ -shareCycle.t2.Y.x.x: structural cycle
479
+ -shareCycle.t3.Y.x.x: structural cycle
480
+ + ./sharecycle.cue:10:3
481
+ +shareCycle.t3.Y.x.x: field not allowed:
482
+ + ./sharecycle.cue:16:10
483
+ + ./sharecycle.cue:16:3
484
+
485
+ Result:
486
+ (_|_){
487
+ @@ -27,102 +32,75 @@
378
488
}
379
489
}
380
490
#Config1: (#struct){
@@ -546,7 +656,7 @@ diff old new
546
656
}
547
657
Config: (#struct){
548
658
cfg: (#struct){
549
- @@ -137 ,24 +110 ,13 @@
659
+ @@ -148 ,24 +126 ,13 @@
550
660
}
551
661
}
552
662
#Config1: (#struct){
@@ -574,7 +684,7 @@ diff old new
574
684
}
575
685
#Config: (#struct){
576
686
cfg: (#struct){
577
- @@ -162 ,12 +124 ,7 @@
687
+ @@ -173 ,12 +140 ,7 @@
578
688
}
579
689
}
580
690
}
@@ -588,7 +698,7 @@ diff old new
588
698
out: (#struct){
589
699
sch: (#struct){
590
700
cfg: (#struct){
591
- @@ -236 ,9 +193 ,7 @@
701
+ @@ -247 ,9 +209 ,7 @@
592
702
}
593
703
debug: (struct){
594
704
sharingOn: (struct){
@@ -599,8 +709,87 @@ diff old new
599
709
b: (struct){
600
710
c: (int){ 1 }
601
711
}
712
+ @@ -284,15 +244,17 @@
713
+ shareCycle: (_|_){
714
+ // [eval]
715
+ t1: (_|_){
716
+ - // [structural cycle]
717
+ - #X: (#struct){
718
+ - }
719
+ - Y: (_|_){
720
+ - // [structural cycle]
721
+ - x: (_|_){
722
+ - // [structural cycle]
723
+ - x: (_|_){
724
+ - // [structural cycle] shareCycle.t1.Y.x.x: structural cycle
725
+ + // [eval]
726
+ + #X: (#struct){
727
+ + }
728
+ + Y: (_|_){
729
+ + // [eval]
730
+ + x: (_|_){
731
+ + // [eval]
732
+ + x: (_|_){
733
+ + // [eval] shareCycle.t1.Y.x.x: field not allowed:
734
+ + // ./sharecycle.cue:4:11
735
+ + // ./sharecycle.cue:4:3
736
+ }
737
+ }
738
+ }
739
+ @@ -306,23 +268,29 @@
740
+ // [eval] shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
741
+ // ./sharecycle.cue:8:6
742
+ // ./sharecycle.cue:9:5
743
+ + // shareCycle.t2.Y.x.x: field not allowed:
744
+ // ./sharecycle.cue:10:11
745
+ - x: (_|_){
746
+ - // [structural cycle] shareCycle.t2.Y.x.x: structural cycle
747
+ + // ./sharecycle.cue:10:3
748
+ + x: (_|_){
749
+ + // [eval] shareCycle.t2.Y.x.x: field not allowed:
750
+ + // ./sharecycle.cue:10:11
751
+ + // ./sharecycle.cue:10:3
752
+ }
753
+ }
754
+ }
755
+ }
756
+ t3: (_|_){
757
+ - // [structural cycle]
758
+ - #X: (#struct){
759
+ - }
760
+ - Y: (_|_){
761
+ - // [structural cycle]
762
+ - x: (_|_){
763
+ - // [structural cycle]
764
+ - x: (_|_){
765
+ - // [structural cycle] shareCycle.t3.Y.x.x: structural cycle
766
+ + // [eval]
767
+ + #X: (#struct){
768
+ + }
769
+ + Y: (_|_){
770
+ + // [eval]
771
+ + x: (_|_){
772
+ + // [eval]
773
+ + x: (_|_){
774
+ + // [eval] shareCycle.t3.Y.x.x: field not allowed:
775
+ + // ./sharecycle.cue:16:10
776
+ + // ./sharecycle.cue:16:3
777
+ }
778
+ }
779
+ }
602
780
-- out/eval --
603
- (struct){
781
+ Errors:
782
+ shareCycle.t1.Y.x.x: structural cycle
783
+ shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
784
+ ./sharecycle.cue:8:6
785
+ ./sharecycle.cue:9:5
786
+ ./sharecycle.cue:10:11
787
+ shareCycle.t2.Y.x.x: structural cycle
788
+ shareCycle.t3.Y.x.x: structural cycle
789
+
790
+ Result:
791
+ (_|_){
792
+ // [eval]
604
793
issue3679: (struct){
605
794
b: (#list){
606
795
0: (string){ "bar" }
@@ -872,6 +1061,53 @@ diff old new
872
1061
}
873
1062
}
874
1063
}
1064
+ shareCycle: (_|_){
1065
+ // [eval]
1066
+ t1: (_|_){
1067
+ // [structural cycle]
1068
+ #X: (#struct){
1069
+ }
1070
+ Y: (_|_){
1071
+ // [structural cycle]
1072
+ x: (_|_){
1073
+ // [structural cycle]
1074
+ x: (_|_){
1075
+ // [structural cycle] shareCycle.t1.Y.x.x: structural cycle
1076
+ }
1077
+ }
1078
+ }
1079
+ }
1080
+ t2: (_|_){
1081
+ // [eval]
1082
+ #X: (int){ int }
1083
+ Y: (_|_){
1084
+ // [eval]
1085
+ x: (_|_){
1086
+ // [eval] shareCycle.t2.Y.x: conflicting values int and {x:(#X & Y)} (mismatched types int and struct):
1087
+ // ./sharecycle.cue:8:6
1088
+ // ./sharecycle.cue:9:5
1089
+ // ./sharecycle.cue:10:11
1090
+ x: (_|_){
1091
+ // [structural cycle] shareCycle.t2.Y.x.x: structural cycle
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+ t3: (_|_){
1097
+ // [structural cycle]
1098
+ #X: (#struct){
1099
+ }
1100
+ Y: (_|_){
1101
+ // [structural cycle]
1102
+ x: (_|_){
1103
+ // [structural cycle]
1104
+ x: (_|_){
1105
+ // [structural cycle] shareCycle.t3.Y.x.x: structural cycle
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ }
875
1111
}
876
1112
-- out/compile --
877
1113
--- acrossdisjunction.cue
@@ -1071,3 +1307,30 @@ diff old new
1071
1307
}
1072
1308
}
1073
1309
}
1310
+ --- sharecycle.cue
1311
+ {
1312
+ shareCycle: {
1313
+ t1: {
1314
+ #X: {}
1315
+ Y: {
1316
+ x: (〈1;#X〉 & 〈1;Y〉)
1317
+ }
1318
+ }
1319
+ }
1320
+ shareCycle: {
1321
+ t2: {
1322
+ #X: int
1323
+ Y: {
1324
+ x: (〈1;#X〉 & 〈1;Y〉)
1325
+ }
1326
+ }
1327
+ }
1328
+ shareCycle: {
1329
+ t3: {
1330
+ #X: {}
1331
+ Y: {
1332
+ x: (〈1;Y〉 & 〈1;#X〉)
1333
+ }
1334
+ }
1335
+ }
1336
+ }
0 commit comments