@@ -486,6 +486,10 @@ issue2263: full: {
486
486
value: number
487
487
}
488
488
}
489
+ -- issue1417.cue --
490
+ #ID: !~"^a" | =~"^ab$" | =~"^aB$"
491
+ #ID: =~"^a" | !~"[A-Z]"
492
+ ids: [...#ID] & ["xyz", "ab", "aB"]
489
493
-- out/evalalpha --
490
494
(struct){
491
495
disambiguateClosed: (struct){
@@ -909,6 +913,12 @@ issue2263: full: {
909
913
}
910
914
}
911
915
}
916
+ #ID: (string){ |((string){ &(!~"^a", =~"^a") }, (string){ &(!~"^a", !~"[A-Z]") }, (string){ &(=~"^ab$", =~"^a") }, (string){ &(=~"^ab$", !~"[A-Z]") }, (string){ &(=~"^aB$", =~"^a") }, (string){ &(=~"^aB$", !~"[A-Z]") }) }
917
+ ids: (#list){
918
+ 0: (string){ "xyz" }
919
+ 1: (string){ "ab" }
920
+ 2: (string){ "aB" }
921
+ }
912
922
issue2209: (struct){
913
923
simplified: (struct){
914
924
t1: (struct){
@@ -1400,8 +1410,9 @@ issue2263: full: {
1400
1410
diff old new
1401
1411
--- old
1402
1412
+++ new
1403
- @@ -1,36 +1,4 @@
1413
+ @@ -1,49 +1,4 @@
1404
1414
-Errors:
1415
+ -ids.2: 2 errors in empty disjunction:
1405
1416
-issue2209.full.Bar.resource.spec: 6 errors in empty disjunction:
1406
1417
-issue2209.full.Bar.resource.spec.minBar: 2 errors in empty disjunction:
1407
1418
-issue2209.full.Bar.resource.spec.minBar: conflicting values null and int (mismatched types null and int):
@@ -1426,6 +1437,18 @@ diff old new
1426
1437
- ./issue2209full.cue:83:16
1427
1438
- ./issue2209full.cue:92:13
1428
1439
- ./issue2209full.cue:105:20
1440
+ -ids.1: invalid value "ab" (out of bound !~"^a"):
1441
+ - ./issue1417.cue:1:6
1442
+ - ./issue1417.cue:3:10
1443
+ - ./issue1417.cue:3:25
1444
+ -ids.2: invalid value "aB" (out of bound !~"^a"):
1445
+ - ./issue1417.cue:1:6
1446
+ - ./issue1417.cue:3:10
1447
+ - ./issue1417.cue:3:31
1448
+ -ids.2: invalid value "aB" (out of bound !~"[A-Z]"):
1449
+ - ./issue1417.cue:2:15
1450
+ - ./issue1417.cue:3:10
1451
+ - ./issue1417.cue:3:31
1429
1452
-issue2209.simplified.t3.BAZ: undefined field: y:
1430
1453
- ./issue2209full.cue:35:9
1431
1454
-issue2209.full.Bar.resource.spec.minBar: undefined field: min:
@@ -1438,23 +1461,23 @@ diff old new
1438
1461
disambiguateClosed: (struct){
1439
1462
b: (#struct){ |((#struct){
1440
1463
x: (bool){ true }
1441
- @@ -121 ,7 +89,6 @@
1464
+ @@ -134 ,7 +89,6 @@
1442
1465
// [incomplete] nestedNonMonotonic.incomplete.a.n2.p1.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2):
1443
1466
// ./in.cue:96:15
1444
1467
// ./in.cue:96:32
1445
1468
- // ./in.cue:97:12
1446
1469
c: (int){ 1 }
1447
1470
}
1448
1471
}
1449
- @@ -133 ,7 +100,6 @@
1472
+ @@ -146 ,7 +100,6 @@
1450
1473
b: (_|_){
1451
1474
// [incomplete] nestedNonMonotonic.incomplete.a.n2.p2.x.a.b: invalid value {c:1} (does not satisfy struct.MinFields(2)): len(fields) < MinFields(2) (1 < 2):
1452
1475
// ./in.cue:102:15
1453
1476
- // ./in.cue:101:12
1454
1477
// ./in.cue:102:32
1455
1478
c: (int){ 1 }
1456
1479
}
1457
- @@ -159 ,16 +125,8 @@
1480
+ @@ -172 ,16 +125,8 @@
1458
1481
x: ((null|struct)){ |((struct){
1459
1482
a: (struct){
1460
1483
b: (_|_){
@@ -1472,7 +1495,7 @@ diff old new
1472
1495
// ./in.cue:138:32
1473
1496
c: (int){ 1 }
1474
1497
d: (int){ 1 }
1475
- @@ -227 ,38 +185,60 @@
1498
+ @@ -240 ,38 +185,60 @@
1476
1499
}, (#struct){
1477
1500
a: (string){ string }
1478
1501
d: (string){ string }
@@ -1565,7 +1588,7 @@ diff old new
1565
1588
d: (string){ string }
1566
1589
}) }
1567
1590
#B: (#struct){ |(*(#struct){
1568
- @@ -293 ,6 +273,17 @@
1591
+ @@ -306 ,6 +273,17 @@
1569
1592
}, (#struct){
1570
1593
a: (string){ string }
1571
1594
d: (string){ string }
@@ -1583,7 +1606,7 @@ diff old new
1583
1606
}) }
1584
1607
#B: (#struct){ |(*(#struct){
1585
1608
}, (#struct){
1586
- @@ -327 ,10 +318,6 @@
1609
+ @@ -340 ,10 +318,6 @@
1587
1610
#type: (#struct){
1588
1611
fieldName: ((string|struct)){ |((string){ string }, (#struct){
1589
1612
foo: (string){ string }
@@ -1594,7 +1617,7 @@ diff old new
1594
1617
}) }
1595
1618
}
1596
1619
#subtype: ((string|struct)){ |((string){ string }, (#struct){
1597
- @@ -364 ,9 +351,12 @@
1620
+ @@ -377 ,9 +351,12 @@
1598
1621
}
1599
1622
}
1600
1623
t4: (struct){
@@ -1610,7 +1633,7 @@ diff old new
1610
1633
#D: (#struct){ |((#struct){
1611
1634
a: (null){ null }
1612
1635
}, (#struct){
1613
- @@ -410 ,12 +400,8 @@
1636
+ @@ -423 ,12 +400,8 @@
1614
1637
#T: (list){
1615
1638
0: (string){ "d" }
1616
1639
}
@@ -1625,7 +1648,7 @@ diff old new
1625
1648
}
1626
1649
issue1940: (struct){
1627
1650
#T: (#list){
1628
- @@ -424,28 +410,18 @@
1651
+ @@ -437,50 +410,24 @@
1629
1652
}
1630
1653
}
1631
1654
#A: (#struct){
@@ -1645,23 +1668,46 @@ diff old new
1645
1668
- 1: (list){
1646
1669
- }
1647
1670
- }
1648
- - }
1671
+ + type: ~(issue1940.#T)
1672
+ }
1673
+ }
1674
+ }
1675
+ #ID: (string){ |((string){ &(!~"^a", =~"^a") }, (string){ &(!~"^a", !~"[A-Z]") }, (string){ &(=~"^ab$", =~"^a") }, (string){ &(=~"^ab$", !~"[A-Z]") }, (string){ &(=~"^aB$", =~"^a") }, (string){ &(=~"^aB$", !~"[A-Z]") }) }
1676
+ - ids: (_|_){
1677
+ - // [eval]
1678
+ + ids: (#list){
1679
+ 0: (string){ "xyz" }
1680
+ - 1: (_|_){
1681
+ - // [eval] ids.1: invalid value "ab" (out of bound !~"^a"):
1682
+ - // ./issue1417.cue:1:6
1683
+ - // ./issue1417.cue:3:10
1684
+ - // ./issue1417.cue:3:25
1685
+ - }
1686
+ - 2: (_|_){
1687
+ - // [eval] ids.2: 2 errors in empty disjunction:
1688
+ - // ids.2: invalid value "aB" (out of bound !~"^a"):
1689
+ - // ./issue1417.cue:1:6
1690
+ - // ./issue1417.cue:3:10
1691
+ - // ./issue1417.cue:3:31
1692
+ - // ids.2: invalid value "aB" (out of bound !~"[A-Z]"):
1693
+ - // ./issue1417.cue:2:15
1694
+ - // ./issue1417.cue:3:10
1695
+ - // ./issue1417.cue:3:31
1649
1696
- }
1650
1697
- }
1651
1698
- issue2209: (_|_){
1652
1699
- // [eval]
1653
1700
- simplified: (_|_){
1654
1701
- // [eval]
1655
- + type: ~(issue1940.#T)
1656
- + }
1657
- + }
1702
+ + 1: (string){ "ab" }
1703
+ + 2: (string){ "aB" }
1658
1704
+ }
1659
1705
+ issue2209: (struct){
1660
1706
+ simplified: (struct){
1661
1707
t1: (struct){
1662
1708
#SpecFoo: (#struct){
1663
1709
foo: (#struct){
1664
- @@ -508 ,185 +484 ,118 @@
1710
+ @@ -543 ,185 +490 ,118 @@
1665
1711
x: (int){ 1 }
1666
1712
}
1667
1713
}
@@ -1958,7 +2004,7 @@ diff old new
1958
2004
}
1959
2005
}
1960
2006
#Abstract: (#struct){
1961
- @@ -702 ,34 +611 ,34 @@
2007
+ @@ -737 ,34 +617 ,34 @@
1962
2008
}
1963
2009
}) }
1964
2010
resource: (#struct){
@@ -2021,7 +2067,7 @@ diff old new
2021
2067
}
2022
2068
}
2023
2069
_#Spec: (#struct){ |(*(#struct){
2024
- @@ -756 ,36 +665 ,36 @@
2070
+ @@ -791 ,36 +671 ,36 @@
2025
2071
}
2026
2072
}
2027
2073
_Thing: (#struct){
@@ -2087,7 +2133,7 @@ diff old new
2087
2133
}
2088
2134
#Constrained: (#struct){
2089
2135
spec: (#struct){ |(*(#struct){
2090
- @@ -869 ,19 +778 ,19 @@
2136
+ @@ -904 ,19 +784 ,19 @@
2091
2137
common: (int){ 3 }
2092
2138
}
2093
2139
#FormFoo: (#struct){
@@ -2114,7 +2160,7 @@ diff old new
2114
2160
}) }
2115
2161
}
2116
2162
#Input: (#struct){
2117
- @@ -930 ,10 +839 ,23 @@
2163
+ @@ -965 ,10 +845 ,23 @@
2118
2164
}
2119
2165
full: (struct){
2120
2166
metrics: (#list){
@@ -2144,14 +2190,14 @@ diff old new
2144
2190
value: (int){ 80 }
2145
2191
-- out/eval/stats --
2146
2192
Leaks: 4
2147
- Freed: 2339
2148
- Reused: 2323
2193
+ Freed: 2368
2194
+ Reused: 2352
2149
2195
Allocs: 20
2150
2196
Retain: 115
2151
2197
2152
- Unifications: 1260
2153
- Conjuncts: 3417
2154
- Disjuncts: 2454
2198
+ Unifications: 1265
2199
+ Conjuncts: 3458
2200
+ Disjuncts: 2483
2155
2201
-- diff/todo/p1 --
2156
2202
issue2263.full: missing elimination, may be lack of closeContext
2157
2203
-- diff/todo/p2 --
@@ -2163,8 +2209,10 @@ issue2209.simplified.t2.BAZ: error reported in wrong location.
2163
2209
-- diff/explanation --
2164
2210
issue2209.simplified.t3: new evaluator fixes known bug.
2165
2211
preserveClosedness.medium.p*: discarding of default is correct.
2212
+ issue1417: new evaluator fixes known bug
2166
2213
-- out/eval --
2167
2214
Errors:
2215
+ ids.2: 2 errors in empty disjunction:
2168
2216
issue2209.full.Bar.resource.spec: 6 errors in empty disjunction:
2169
2217
issue2209.full.Bar.resource.spec.minBar: 2 errors in empty disjunction:
2170
2218
issue2209.full.Bar.resource.spec.minBar: conflicting values null and int (mismatched types null and int):
@@ -2189,6 +2237,18 @@ issue2209.full.Bar.resource.spec.minFoo: conflicting values null and int (mismat
2189
2237
./issue2209full.cue:83:16
2190
2238
./issue2209full.cue:92:13
2191
2239
./issue2209full.cue:105:20
2240
+ ids.1: invalid value "ab" (out of bound !~"^a"):
2241
+ ./issue1417.cue:1:6
2242
+ ./issue1417.cue:3:10
2243
+ ./issue1417.cue:3:25
2244
+ ids.2: invalid value "aB" (out of bound !~"^a"):
2245
+ ./issue1417.cue:1:6
2246
+ ./issue1417.cue:3:10
2247
+ ./issue1417.cue:3:31
2248
+ ids.2: invalid value "aB" (out of bound !~"[A-Z]"):
2249
+ ./issue1417.cue:2:15
2250
+ ./issue1417.cue:3:10
2251
+ ./issue1417.cue:3:31
2192
2252
issue2209.simplified.t3.BAZ: undefined field: y:
2193
2253
./issue2209full.cue:35:9
2194
2254
issue2209.full.Bar.resource.spec.minBar: undefined field: min:
@@ -2608,6 +2668,28 @@ Result:
2608
2668
}
2609
2669
}
2610
2670
}
2671
+ #ID: (string){ |((string){ &(!~"^a", =~"^a") }, (string){ &(!~"^a", !~"[A-Z]") }, (string){ &(=~"^ab$", =~"^a") }, (string){ &(=~"^ab$", !~"[A-Z]") }, (string){ &(=~"^aB$", =~"^a") }, (string){ &(=~"^aB$", !~"[A-Z]") }) }
2672
+ ids: (_|_){
2673
+ // [eval]
2674
+ 0: (string){ "xyz" }
2675
+ 1: (_|_){
2676
+ // [eval] ids.1: invalid value "ab" (out of bound !~"^a"):
2677
+ // ./issue1417.cue:1:6
2678
+ // ./issue1417.cue:3:10
2679
+ // ./issue1417.cue:3:25
2680
+ }
2681
+ 2: (_|_){
2682
+ // [eval] ids.2: 2 errors in empty disjunction:
2683
+ // ids.2: invalid value "aB" (out of bound !~"^a"):
2684
+ // ./issue1417.cue:1:6
2685
+ // ./issue1417.cue:3:10
2686
+ // ./issue1417.cue:3:31
2687
+ // ids.2: invalid value "aB" (out of bound !~"[A-Z]"):
2688
+ // ./issue1417.cue:2:15
2689
+ // ./issue1417.cue:3:10
2690
+ // ./issue1417.cue:3:31
2691
+ }
2692
+ }
2611
2693
issue2209: (_|_){
2612
2694
// [eval]
2613
2695
simplified: (_|_){
@@ -3866,6 +3948,18 @@ Result:
3866
3948
})
3867
3949
}
3868
3950
}
3951
+ --- issue1417.cue
3952
+ {
3953
+ #ID: (!~"^a"|=~"^ab$"|=~"^aB$")
3954
+ #ID: (=~"^a"|!~"[A-Z]")
3955
+ ids: ([
3956
+ ...〈1;#ID〉,
3957
+ ] & [
3958
+ "xyz",
3959
+ "ab",
3960
+ "aB",
3961
+ ])
3962
+ }
3869
3963
--- issue2209full.cue
3870
3964
{
3871
3965
issue2209: {
0 commit comments