Skip to content

Commit 77646bf

Browse files
mpvlcueckoo
authored andcommitted
WIP: closed update
Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: Ie4fa7053f8161a81f88a44f4570cb4b3cc782a36 Dispatch-Trailer: {"type":"trybot","CL":1216409,"patchset":1,"ref":"refs/changes/09/1216409/1","targetBranch":"master"}
1 parent fca5f05 commit 77646bf

File tree

3 files changed

+63
-85
lines changed

3 files changed

+63
-85
lines changed

cue/testdata/definitions/typocheck.txtar

Lines changed: 40 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Unifications: 655
485485
Conjuncts: 1267
486486
Disjuncts: 50
487487

488-
CloseIDElems: 3157
488+
CloseIDElems: 3142
489489
NumCloseIDs: 360
490490
-- diff/-out/evalalpha/stats<==>+out/eval/stats --
491491
diff old new
@@ -514,7 +514,7 @@ diff old new
514514
+Conjuncts: 1267
515515
+Disjuncts: 50
516516
+
517-
+CloseIDElems: 3157
517+
+CloseIDElems: 3142
518518
+NumCloseIDs: 360
519519
-- out/eval/stats --
520520
Leaks: 116
@@ -535,8 +535,6 @@ and.transitive.err.out.err: field not allowed:
535535
./in.cue:46:3
536536
and.transitiveWithEmbed.err.out.err: field not allowed:
537537
./in.cue:62:3
538-
closeInEmbed.x.d.e: field not allowed:
539-
./chaineddef.cue:17:8
540538
embed.andEmbed.d.err: field not allowed:
541539
./in.cue:31:11
542540
embed.andInStruct.a.err: field not allowed:
@@ -597,16 +595,10 @@ Result:
597595
}
598596
}
599597
}
600-
closeInEmbed: (_|_){
601-
// [eval]
602-
x: (_|_){
603-
// [eval]
604-
d: (_|_){
605-
// [eval]
606-
e: (_|_){
607-
// [eval] closeInEmbed.x.d.e: field not allowed:
608-
// ./chaineddef.cue:17:8
609-
}
598+
closeInEmbed: (struct){
599+
x: (#struct){
600+
d: (struct){
601+
e: (int){ 1 }
610602
f: (int){ int }
611603
}
612604
}
@@ -1606,7 +1598,7 @@ Result:
16061598
diff old new
16071599
--- old
16081600
+++ new
1609-
@@ -1,86 +1,36 @@
1601+
@@ -1,86 +1,34 @@
16101602
Errors:
16111603
and.transitive.err.out.err: field not allowed:
16121604
- ./in.cue:42:5
@@ -1623,8 +1615,6 @@ diff old new
16231615
- ./in.cue:60:7
16241616
- ./in.cue:61:7
16251617
./in.cue:62:3
1626-
+closeInEmbed.x.d.e: field not allowed:
1627-
+ ./chaineddef.cue:17:8
16281618
embed.andEmbed.d.err: field not allowed:
16291619
- ./in.cue:28:6
16301620
- ./in.cue:29:6
@@ -1698,7 +1688,7 @@ diff old new
16981688
embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1:
16991689
./validators.cue:21:5
17001690
./validators.cue:21:12
1701-
@@ -93,14 +43,12 @@
1691+
@@ -93,14 +41,12 @@
17021692
issue3920: (struct){
17031693
out: (#struct){
17041694
a: (#struct){
@@ -1715,28 +1705,7 @@ diff old new
17151705
}
17161706
#B: (#struct){
17171707
c?: (string){ string }
1718-
@@ -117,10 +65,16 @@
1719-
}
1720-
}
1721-
}
1722-
- closeInEmbed: (struct){
1723-
- x: (#struct){
1724-
- d: (struct){
1725-
- e: (int){ 1 }
1726-
+ closeInEmbed: (_|_){
1727-
+ // [eval]
1728-
+ x: (_|_){
1729-
+ // [eval]
1730-
+ d: (_|_){
1731-
+ // [eval]
1732-
+ e: (_|_){
1733-
+ // [eval] closeInEmbed.x.d.e: field not allowed:
1734-
+ // ./chaineddef.cue:17:8
1735-
+ }
1736-
f: (int){ int }
1737-
}
1738-
}
1739-
@@ -140,10 +94,7 @@
1708+
@@ -140,10 +86,7 @@
17401709
allowed?: (string){ string }
17411710
disallowed: (_|_){
17421711
// [eval] issue3947.full.out.disallowed: field not allowed:
@@ -1747,7 +1716,7 @@ diff old new
17471716
}
17481717
}
17491718
}
1750-
@@ -228,14 +179,11 @@
1719+
@@ -228,14 +171,11 @@
17511720
}
17521721
a: (_|_){
17531722
// [eval]
@@ -1763,7 +1732,7 @@ diff old new
17631732
}
17641733
}
17651734
andInStruct: (_|_){
1766-
@@ -245,14 +193,11 @@
1735+
@@ -245,14 +185,11 @@
17671736
}
17681737
a: (_|_){
17691738
// [eval]
@@ -1779,7 +1748,7 @@ diff old new
17791748
}
17801749
}
17811750
embedDefWithEmbedding: (_|_){
1782-
@@ -262,15 +207,11 @@
1751+
@@ -262,15 +199,11 @@
17831752
}
17841753
a: (_|_){
17851754
// [eval]
@@ -1796,7 +1765,7 @@ diff old new
17961765
}
17971766
}
17981767
embedComprehension: (_|_){
1799-
@@ -280,16 +221,11 @@
1768+
@@ -280,16 +213,11 @@
18001769
}
18011770
a: (_|_){
18021771
// [eval]
@@ -1814,7 +1783,7 @@ diff old new
18141783
}
18151784
}
18161785
fieldWithAnd: (_|_){
1817-
@@ -300,9 +236,6 @@
1786+
@@ -300,9 +228,6 @@
18181787
// [eval]
18191788
err: (_|_){
18201789
// [eval] embed.fieldWithAnd.a.err: field not allowed:
@@ -1824,7 +1793,7 @@ diff old new
18241793
// ./in.cue:20:13
18251794
}
18261795
}
1827-
@@ -313,20 +246,15 @@
1796+
@@ -313,20 +238,15 @@
18281797
a: (int){ int }
18291798
}
18301799
B: (struct){
@@ -1850,7 +1819,7 @@ diff old new
18501819
}
18511820
}
18521821
andEmbed: (_|_){
1853-
@@ -342,17 +270,11 @@
1822+
@@ -342,17 +262,11 @@
18541823
}
18551824
d: (_|_){
18561825
// [eval]
@@ -1869,7 +1838,7 @@ diff old new
18691838
}
18701839
}
18711840
nonDef: (struct){
1872-
@@ -361,12 +283,12 @@
1841+
@@ -361,12 +275,12 @@
18731842
a: (string){ string }
18741843
}
18751844
#Y: (#struct){
@@ -1886,7 +1855,7 @@ diff old new
18861855
}
18871856
}
18881857
}
1889-
@@ -376,12 +298,12 @@
1858+
@@ -376,12 +290,12 @@
18901859
Name: (string){ string }
18911860
}
18921861
#Step: (#struct){
@@ -1903,7 +1872,7 @@ diff old new
19031872
}
19041873
out: (#struct){
19051874
Name: (string){ "foo" }
1906-
@@ -391,21 +313,15 @@
1875+
@@ -391,21 +305,15 @@
19071876
}
19081877
withIndirect: (_|_){
19091878
// [eval]
@@ -1930,7 +1899,7 @@ diff old new
19301899
}
19311900
normalValidator: (_|_){
19321901
// [eval]
1933-
@@ -415,20 +331,17 @@
1902+
@@ -415,20 +323,17 @@
19341903
}
19351904
x: (_|_){
19361905
// [eval]
@@ -1954,7 +1923,7 @@ diff old new
19541923
#X: (_){
19551924
matchN(0, (#list){
19561925
})
1957-
@@ -435,17 +348,10 @@
1926+
@@ -435,17 +340,10 @@
19581927
a?: (int){ int }
19591928
b?: (int){ int }
19601929
}
@@ -1976,7 +1945,7 @@ diff old new
19761945
}
19771946
}
19781947
t2: (_|_){
1979-
@@ -464,10 +370,7 @@
1948+
@@ -464,10 +362,7 @@
19801949
// [eval]
19811950
b: (_|_){
19821951
// [eval] embed.openValidator.t2.a.b: conflicting values 1 and {b?:Y} (mismatched types int and struct):
@@ -1987,7 +1956,7 @@ diff old new
19871956
// ./validators.cue:24:8
19881957
// embed.openValidator.t2.a.b: invalid value 1 (does not satisfy matchN): 0 matched, expected 1:
19891958
// ./validators.cue:21:5
1990-
@@ -510,16 +413,11 @@
1959+
@@ -510,16 +405,11 @@
19911960
}
19921961
out: (_|_){
19931962
// [eval]
@@ -2005,7 +1974,7 @@ diff old new
20051974
}
20061975
}
20071976
}
2008-
@@ -552,17 +450,11 @@
1977+
@@ -552,17 +442,11 @@
20091978
}
20101979
out: (_|_){
20111980
// [eval]
@@ -2024,7 +1993,7 @@ diff old new
20241993
}
20251994
}
20261995
}
2027-
@@ -608,8 +500,8 @@
1996+
@@ -608,8 +492,8 @@
20281997
// ./issue3832.cue:8:16
20291998
}
20301999
outFirstName: (_|_){
@@ -2035,7 +2004,7 @@ diff old new
20352004
}
20362005
}
20372006
}
2038-
@@ -619,35 +511,27 @@
2007+
@@ -619,35 +503,27 @@
20392008
}, (#struct){
20402009
pass: (#struct){
20412010
let self#1 = (_|_){
@@ -2081,7 +2050,7 @@ diff old new
20812050
pass: (#struct){
20822051
let self#1 = (#struct){
20832052
firstName: (string){ "Sam" }
2084-
@@ -654,20 +538,24 @@
2053+
@@ -654,20 +530,24 @@
20852054
}
20862055
outFirstName: (string){ "Sam" }
20872056
}
@@ -2120,7 +2089,7 @@ diff old new
21202089
ok: (struct){
21212090
out: (#struct){
21222091
a: (#struct){
2123-
@@ -688,11 +576,18 @@
2092+
@@ -688,11 +568,18 @@
21242093
b: (string){ "foo" }
21252094
}
21262095
}
@@ -2144,7 +2113,7 @@ diff old new
21442113
}
21452114
}
21462115
#A: (#struct){
2147-
@@ -763,12 +658,8 @@
2116+
@@ -763,12 +650,8 @@
21482117
globalField: (string){ string }
21492118
}
21502119
#Context: (#struct){
@@ -2159,7 +2128,7 @@ diff old new
21592128
}
21602129
out: (struct){
21612130
ingress: (#struct){
2162-
@@ -796,22 +687,22 @@
2131+
@@ -796,22 +679,22 @@
21632132
#Z: (#struct){
21642133
}
21652134
x: (#struct){
@@ -2198,7 +2167,7 @@ diff old new
21982167
z: (int){ 1 }
21992168
}
22002169
}
2201-
@@ -821,22 +712,22 @@
2170+
@@ -821,22 +704,22 @@
22022171
#Z: (#struct){
22032172
}
22042173
x: (#struct){
@@ -2237,7 +2206,7 @@ diff old new
22372206
z: (int){ 1 }
22382207
}
22392208
}
2240-
@@ -851,11 +742,7 @@
2209+
@@ -851,11 +734,7 @@
22412210
}
22422211
}
22432212
#JobConfig: (#struct){
@@ -2250,7 +2219,7 @@ diff old new
22502219
job: (#struct){
22512220
image: (string){ "foo:v1" }
22522221
vcs: (string){ "git" }
2253-
@@ -919,7 +806,7 @@
2222+
@@ -919,7 +798,7 @@
22542223
}
22552224
}
22562225
out: (#struct){
@@ -2259,7 +2228,7 @@ diff old new
22592228
input: (#struct){
22602229
image: (string){ "someimage" }
22612230
env: (string){ "FOO" }
2262-
@@ -951,11 +838,11 @@
2231+
@@ -951,11 +830,11 @@
22632232
_in: (_){ _ }
22642233
out: (_){ _ }
22652234
}
@@ -2276,7 +2245,7 @@ diff old new
22762245
e: (string){ "foo" }
22772246
f: (int){ 1 }
22782247
}
2279-
@@ -988,24 +875,16 @@
2248+
@@ -988,24 +867,16 @@
22802249
_in: (_){ _ }
22812250
out: (_){ _ }
22822251
}
@@ -2311,7 +2280,7 @@ diff old new
23112280
}
23122281
}
23132282
issue3934: (struct){
2314-
@@ -1052,7 +931,7 @@
2283+
@@ -1052,7 +923,7 @@
23152284
op: (string){ "add" }
23162285
path: (string){ "/metadata" }
23172286
value: (_|_){
@@ -2320,7 +2289,7 @@ diff old new
23202289
// ./large.cue:7:25
23212290
// ./large.cue:3:12
23222291
}
2323-
@@ -1081,38 +960,11 @@
2292+
@@ -1081,38 +952,11 @@
23242293
#Main: (#struct){
23252294
namespace: (string){ string }
23262295
output: (_|_){
@@ -2361,7 +2330,7 @@ diff old new
23612330
let base#6 = (#struct){
23622331
someMsg: (string){ string }
23632332
obs: (#struct){ |(*(#struct){
2364-
@@ -1131,7 +983,7 @@
2333+
@@ -1131,7 +975,7 @@
23652334
op: (string){ "add" }
23662335
path: (string){ "/metadata" }
23672336
value: (_|_){
@@ -2370,7 +2339,7 @@ diff old new
23702339
// ./large.cue:7:25
23712340
// ./large.cue:3:12
23722341
}
2373-
@@ -1155,6 +1007,19 @@
2342+
@@ -1155,6 +999,19 @@
23742343
}
23752344
}
23762345
}
@@ -2390,7 +2359,7 @@ diff old new
23902359
}
23912360
}
23922361
out: (#struct){
2393-
@@ -1184,17 +1049,8 @@
2362+
@@ -1184,17 +1041,8 @@
23942363
// ./validators.cue:32:17
23952364
// disjunction.withErr.t1.out.b1.b2.b3: undefined field: mayExistLater:
23962365
// ./validators.cue:29:22

cue/types_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,8 +2267,6 @@ func TestUnify(t *testing.T) {
22672267

22682268
// TestUnify2 is similar to TestUnify, but uses CompileString and Validate.
22692269
func TestUnify2(t *testing.T) {
2270-
t.Skip("TODO: fix")
2271-
22722270
type testCase struct {
22732271
a string
22742272
b string

0 commit comments

Comments
 (0)