@@ -273,16 +273,37 @@ indexElimination: {
273
273
z: [for i, v in y {bits.Set(*z[i-1] | 0, len(y)-i-1, v)}][3]
274
274
}
275
275
}
276
+ -- issue3899.cue --
277
+ issue3899: reduced: p1: {
278
+ b: c + "" | string
279
+ c?: string
280
+ }
281
+ issue3899: reduced: p1: {
282
+ c?: string
283
+ b: c + "" | string
284
+ }
285
+ issue3899: full: {
286
+ out: #Schema & {
287
+ name: "foo"
288
+ }
289
+ #Schema: {
290
+ _versions: foo: "123"
291
+ spec: limits: true
292
+ name!: string
293
+ spec: image: string | *"\(name)"
294
+ deployImage: _versions[spec.image]
295
+ }
296
+ }
276
297
-- out/eval/stats --
277
298
Leaks: 36
278
- Freed: 709
279
- Reused: 695
299
+ Freed: 739
300
+ Reused: 725
280
301
Allocs: 50
281
- Retain: 77
302
+ Retain: 95
282
303
283
- Unifications: 408
284
- Conjuncts: 1394
285
- Disjuncts: 756
304
+ Unifications: 430
305
+ Conjuncts: 1449
306
+ Disjuncts: 803
286
307
-- out/evalalpha --
287
308
Errors:
288
309
f: 2 errors in empty disjunction:
@@ -298,6 +319,9 @@ issue3606.data: conflicting values string and {notAllowed:true} (mismatched type
298
319
./dependencies.cue:6:6
299
320
issue3606.data.notAllowed: field not allowed:
300
321
./dependencies.cue:3:3
322
+ issue3899.full.#Schema.deployImage: invalid index spec.image (invalid type _):
323
+ ./issue3899.cue:18:18
324
+ ./issue3899.cue:18:28
301
325
302
326
Result:
303
327
(_|_){
@@ -699,6 +723,45 @@ Result:
699
723
}) }
700
724
}
701
725
}
726
+ issue3899: (_|_){
727
+ // [eval]
728
+ reduced: (struct){
729
+ p1: (struct){
730
+ b: (_){ |((_){ _ }, (string){ string }) }
731
+ c?: (string){ string }
732
+ }
733
+ }
734
+ full: (_|_){
735
+ // [eval]
736
+ out: (#struct){
737
+ name: (string){ "foo" }
738
+ _versions: (#struct){
739
+ foo: (string){ "123" }
740
+ }
741
+ spec: (#struct){
742
+ limits: (bool){ true }
743
+ image: (string){ |(*(string){ "foo" }, (string){ string }) }
744
+ }
745
+ deployImage: (string){ "123" }
746
+ }
747
+ #Schema: (_|_){
748
+ // [eval]
749
+ _versions: (#struct){
750
+ foo: (string){ "123" }
751
+ }
752
+ spec: (#struct){
753
+ limits: (bool){ true }
754
+ image: (_){ |(*(_){ _ }, (string){ string }) }
755
+ }
756
+ name!: (string){ string }
757
+ deployImage: (_|_){
758
+ // [eval] issue3899.full.#Schema.deployImage: invalid index spec.image (invalid type _):
759
+ // ./issue3899.cue:18:18
760
+ // ./issue3899.cue:18:28
761
+ }
762
+ }
763
+ }
764
+ }
702
765
}
703
766
-- diff/-out/evalalpha<==>+out/eval --
704
767
diff old new
@@ -716,16 +779,19 @@ diff old new
716
779
./in.cue:15:27
717
780
issue3606.data: 2 errors in empty disjunction:
718
781
issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct):
719
- @@ -14,8 +12,6 @@
782
+ @@ -14,8 +12,9 @@
720
783
./dependencies.cue:6:6
721
784
issue3606.data.notAllowed: field not allowed:
722
785
./dependencies.cue:3:3
723
786
- ./dependencies.cue:4:6
724
787
- ./dependencies.cue:6:15
788
+ +issue3899.full.#Schema.deployImage: invalid index spec.image (invalid type _):
789
+ + ./issue3899.cue:18:18
790
+ + ./issue3899.cue:18:28
725
791
726
792
Result:
727
793
(_|_){
728
- @@ -29,14 +25 ,7 @@
794
+ @@ -29,14 +28 ,7 @@
729
795
// ./dependencies.cue:6:6
730
796
// issue3606.data.notAllowed: field not allowed:
731
797
// ./dependencies.cue:3:3
@@ -741,7 +807,7 @@ diff old new
741
807
}
742
808
#S: ((string|struct)){ |((string){ string }, (#struct){
743
809
}) }
744
- @@ -144,19 +133 ,12 @@
810
+ @@ -144,19 +136 ,12 @@
745
811
// [eval] f: 2 errors in empty disjunction:
746
812
// f.name: conflicting values "int" and "str":
747
813
// ./in.cue:5:8
@@ -762,7 +828,7 @@ diff old new
762
828
}
763
829
e1: (struct){
764
830
a: ((null|struct)){ |((null){ null }, (struct){
765
- @@ -268,8 +250 ,8 @@
831
+ @@ -268,8 +253 ,8 @@
766
832
e: (struct){
767
833
foobar: (#struct){
768
834
b: (#struct){
@@ -772,7 +838,7 @@ diff old new
772
838
}
773
839
}
774
840
}
775
- @@ -279,10 +261 ,7 @@
841
+ @@ -279,10 +264 ,7 @@
776
842
x: (int){ 0 }
777
843
}
778
844
inList1: (struct){
@@ -784,7 +850,7 @@ diff old new
784
850
}
785
851
inList2: (struct){
786
852
x: (int){ 0 }
787
- @@ -402,7 +381 ,7 @@
853
+ @@ -402,7 +384 ,7 @@
788
854
let Ok#2 = (bool){ true }
789
855
}, (#struct){
790
856
_ok: (bool){ true }
@@ -793,6 +859,70 @@ diff old new
793
859
x: (bool){ true }
794
860
}) }
795
861
bar: (#struct){ |((#struct){
862
+ @@ -434,37 +416,41 @@
863
+ }) }
864
+ }
865
+ }
866
+ - issue3899: (struct){
867
+ - reduced: (struct){
868
+ - p1: (struct){
869
+ - b: (string){ string }
870
+ + issue3899: (_|_){
871
+ + // [eval]
872
+ + reduced: (struct){
873
+ + p1: (struct){
874
+ + b: (_){ |((_){ _ }, (string){ string }) }
875
+ c?: (string){ string }
876
+ }
877
+ }
878
+ - full: (struct){
879
+ - out: (#struct){
880
+ - _versions: (#struct){
881
+ - foo: (string){ "123" }
882
+ - }
883
+ - spec: (#struct){
884
+ - limits: (bool){ true }
885
+ - image: (string){ |(*(string){ "foo" }, (string){ string }) }
886
+ - }
887
+ + full: (_|_){
888
+ + // [eval]
889
+ + out: (#struct){
890
+ name: (string){ "foo" }
891
+ + _versions: (#struct){
892
+ + foo: (string){ "123" }
893
+ + }
894
+ + spec: (#struct){
895
+ + limits: (bool){ true }
896
+ + image: (string){ |(*(string){ "foo" }, (string){ string }) }
897
+ + }
898
+ deployImage: (string){ "123" }
899
+ }
900
+ - #Schema: (#struct){
901
+ - _versions: (#struct){
902
+ - foo: (string){ "123" }
903
+ - }
904
+ - spec: (#struct){
905
+ - limits: (bool){ true }
906
+ - image: (string){ string }
907
+ + #Schema: (_|_){
908
+ + // [eval]
909
+ + _versions: (#struct){
910
+ + foo: (string){ "123" }
911
+ + }
912
+ + spec: (#struct){
913
+ + limits: (bool){ true }
914
+ + image: (_){ |(*(_){ _ }, (string){ string }) }
915
+ }
916
+ name!: (string){ string }
917
+ deployImage: (_|_){
918
+ - // [incomplete] issue3899.full.#Schema.deployImage: invalid non-ground value string (must be concrete string):
919
+ - // ./issue3899.cue:17:18
920
+ + // [eval] issue3899.full.#Schema.deployImage: invalid index spec.image (invalid type _):
921
+ + // ./issue3899.cue:18:18
922
+ + // ./issue3899.cue:18:28
923
+ }
924
+ }
925
+ }
796
926
-- diff/todo/p3 --
797
927
Missing error positions.
798
928
It is probably okay to show name and val fields with original values, as long
@@ -1235,6 +1365,41 @@ Result:
1235
1365
}) }
1236
1366
}
1237
1367
}
1368
+ issue3899: (struct){
1369
+ reduced: (struct){
1370
+ p1: (struct){
1371
+ b: (string){ string }
1372
+ c?: (string){ string }
1373
+ }
1374
+ }
1375
+ full: (struct){
1376
+ out: (#struct){
1377
+ _versions: (#struct){
1378
+ foo: (string){ "123" }
1379
+ }
1380
+ spec: (#struct){
1381
+ limits: (bool){ true }
1382
+ image: (string){ |(*(string){ "foo" }, (string){ string }) }
1383
+ }
1384
+ name: (string){ "foo" }
1385
+ deployImage: (string){ "123" }
1386
+ }
1387
+ #Schema: (#struct){
1388
+ _versions: (#struct){
1389
+ foo: (string){ "123" }
1390
+ }
1391
+ spec: (#struct){
1392
+ limits: (bool){ true }
1393
+ image: (string){ string }
1394
+ }
1395
+ name!: (string){ string }
1396
+ deployImage: (_|_){
1397
+ // [incomplete] issue3899.full.#Schema.deployImage: invalid non-ground value string (must be concrete string):
1398
+ // ./issue3899.cue:17:18
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1238
1403
}
1239
1404
-- out/compile --
1240
1405
--- dependencies.cue
@@ -1722,3 +1887,42 @@ Result:
1722
1887
}
1723
1888
}
1724
1889
}
1890
+ --- issue3899.cue
1891
+ {
1892
+ issue3899: {
1893
+ reduced: {
1894
+ p1: {
1895
+ b: ((〈0;c〉 + "")|string)
1896
+ c?: string
1897
+ }
1898
+ }
1899
+ }
1900
+ issue3899: {
1901
+ reduced: {
1902
+ p1: {
1903
+ c?: string
1904
+ b: ((〈0;c〉 + "")|string)
1905
+ }
1906
+ }
1907
+ }
1908
+ issue3899: {
1909
+ full: {
1910
+ out: (〈0;#Schema〉 & {
1911
+ name: "foo"
1912
+ })
1913
+ #Schema: {
1914
+ _versions: {
1915
+ foo: "123"
1916
+ }
1917
+ spec: {
1918
+ limits: true
1919
+ }
1920
+ name!: string
1921
+ spec: {
1922
+ image: (string|*"\(〈1;name〉)")
1923
+ }
1924
+ deployImage: 〈0;_versions〉[〈0;spec〉.image]
1925
+ }
1926
+ }
1927
+ }
1928
+ }
0 commit comments