this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/core/adt: eagerly update kind to StructKind when aStruct is set

Previously, when a nodeContext had aStruct set (indicating it contains
struct members), the kind field might still be "top" during mid-evaluation.
This required a workaround in isEqualNodeValue to manually check aStruct
and mask the kind to StructKind for comparison.

This change updates the kind field to StructKind immediately when aStruct
is set, making the kind field accurate throughout evaluation. This allows
removal of the TODO workaround in isEqualNodeValue.

There are a number of test changes. First, the more precise kinds
cause some conflict errors to reorder their arguments.
Second, this reordering causes some more errors to be deduplicated,
as now the kind mid-evaluation is more likely to align
with the kind once a value is fully evaluated.

Third, some conflicting values errors are now much shorter,
as they are now based on the kind that we figure out upfront
rather than the full value that we would previously evaluate.
For example, from the encoding/jsonschema tests, we'd previously get:

conflicting values "a string to match #/$defs/id_in_enum" and {$id!:"https://localhost:1234/draft2020-12/id/my_identifier.json",type!:"null"} (mismatched types string and struct):
instance.json:1:1
conflicting values "a string to match #/$defs/id_in_enum" and {...} (mismatched types string and struct):
instance.json:1:1
invalid value "a string to match #/$defs/id_in_enum" (does not satisfy matchN): 0 matched, expected >=1:
instance.json:1:1

and now we omit the first error, which is redundant:

conflicting values "a string to match #/$defs/id_in_enum" and {...} (mismatched types string and struct):
instance.json:1:1
invalid value "a string to match #/$defs/id_in_enum" (does not satisfy matchN): 0 matched, expected >=1:
instance.json:1:1

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ifd693ee8edb4413cb582449697ea103b8a191bd5
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1227404
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+579 -434
+5 -9
cmd/cue/cmd/testdata/script/exp_gengotypes.txtar
··· 232 232 ./root/types.cue:40:23 233 233 ./root/types.cue:44:14 234 234 ./root/types.cue:46:9 235 - fail.both."44_GraphNode".types.GraphNode.edges: conflicting values [...#graphNode] and {} (mismatched types list and struct): 235 + fail.both."44_GraphNode".types.GraphNode.edges: conflicting values {} and [...#graphNode] (mismatched types struct and list): 236 236 ./cuetest/all.cue:20:1 237 237 ./cuetest/all.cue:27:2 238 238 ./cuetest/all.cue:28:56 ··· 242 242 ./root/root.cue:13:10 243 243 ./root/types.cue:41:23 244 244 ./root/types.cue:50:10 245 - fail.both.notList: conflicting values [1,2,3] and {embedded2?:int} (mismatched types list and struct): 245 + fail.both.notList: conflicting values [1,2,3] and {doc?:_} (mismatched types list and struct): 246 246 ./cuetest/all.cue:5:24 247 247 ./cuetest/fail_check.cue:7:17 248 - ./root/root.cue:9:8 249 - ./root/root.cue:11:2 250 - ./root/root.cue:136:2 251 - fail.both.notString: conflicting values "not_a_struct" and {embedded2?:int} (mismatched types string and struct): 248 + ./root/root.cue:124:8 249 + fail.both.notString: conflicting values "not_a_struct" and {doc?:_} (mismatched types string and struct): 252 250 ./cuetest/all.cue:4:24 253 251 ./cuetest/fail_check.cue:7:17 254 - ./root/root.cue:9:8 255 - ./root/root.cue:11:2 256 - ./root/root.cue:136:2 252 + ./root/root.cue:124:8 257 253 fail.cue."11_Int8".types.Int8: invalid value 99999 (out of bound <=127): 258 254 ./cuetest/all.cue:61:30 259 255 fail.cue."12_Int8".types.Int8: invalid value -99999 (out of bound >=-128):
+4 -4
cue/testdata/builtins/closed.txtar
··· 104 104 105 105 NumCloseIDs: 88 106 106 107 - ConjunctInfos: 259 108 - MaxConjunctInfos: 5 107 + ConjunctInfos: 262 108 + MaxConjunctInfos: 6 109 109 MaxReqSets: 6 110 110 MaxRedirect: 2 111 111 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- ··· 134 134 + 135 135 +NumCloseIDs: 88 136 136 + 137 - +ConjunctInfos: 259 138 - +MaxConjunctInfos: 5 137 + +ConjunctInfos: 262 138 + +MaxConjunctInfos: 6 139 139 +MaxReqSets: 6 140 140 +MaxRedirect: 2 141 141 -- out/eval/stats --
+58 -6
cue/testdata/builtins/matchn.txtar
··· 1390 1390 } 1391 1391 -- out/evalalpha -- 1392 1392 Errors: 1393 - closedByDefinition.err5.out.exports: conflicting values null and {exp1:"./main-module.js"} (mismatched types null and struct): 1393 + closedByDefinition.err5.out.exports: conflicting values {exp1:"./main-module.js"} and null (mismatched types struct and null): 1394 1394 ./closedness.cue:80:13 1395 1395 ./closedness.cue:80:24 1396 1396 ./closedness.cue:85:7 ··· 1408 1408 ./closedness.cue:82:26 1409 1409 ./closedness.cue:85:7 1410 1410 ./closedness.cue:86:18 1411 - explicitClose.err1.out.a: conflicting values "all" and {baz:"notAllowed"} (mismatched types string and struct): 1411 + explicitClose.err1.out.a: conflicting values {baz:"notAllowed"} and "all" (mismatched types struct and string): 1412 1412 ./closedness.cue:32:11 1413 1413 ./closedness.cue:32:12 1414 1414 ./closedness.cue:33:6 ··· 1435 1435 ./in.cue:4:5 1436 1436 ./in.cue:8:28 1437 1437 ./in.cue:10:16 1438 - openArguments.err2.out.a: conflicting values null and {allowed:"once"} (mismatched types null and struct): 1438 + openArguments.err2.out.a: conflicting values {allowed:"once"} and null (mismatched types struct and null): 1439 1439 ./closedness.cue:20:11 1440 1440 ./closedness.cue:20:12 1441 1441 ./closedness.cue:21:13 ··· 1646 1646 out: (_|_){ 1647 1647 // [eval] 1648 1648 a: (_|_){ 1649 - // [eval] openArguments.err2.out.a: conflicting values null and {allowed:"once"} (mismatched types null and struct): 1649 + // [eval] openArguments.err2.out.a: conflicting values {allowed:"once"} and null (mismatched types struct and null): 1650 1650 // ./closedness.cue:20:11 1651 1651 // ./closedness.cue:20:12 1652 1652 // ./closedness.cue:21:13 ··· 1679 1679 out: (_|_){ 1680 1680 // [eval] 1681 1681 a: (_|_){ 1682 - // [eval] explicitClose.err1.out.a: conflicting values "all" and {baz:"notAllowed"} (mismatched types string and struct): 1682 + // [eval] explicitClose.err1.out.a: conflicting values {baz:"notAllowed"} and "all" (mismatched types struct and string): 1683 1683 // ./closedness.cue:32:11 1684 1684 // ./closedness.cue:32:12 1685 1685 // ./closedness.cue:33:6 ··· 1840 1840 out: (_|_){ 1841 1841 // [eval] 1842 1842 exports: (_|_){ 1843 - // [eval] closedByDefinition.err5.out.exports: conflicting values null and {exp1:"./main-module.js"} (mismatched types null and struct): 1843 + // [eval] closedByDefinition.err5.out.exports: conflicting values {exp1:"./main-module.js"} and null (mismatched types struct and null): 1844 1844 // ./closedness.cue:80:13 1845 1845 // ./closedness.cue:80:24 1846 1846 // ./closedness.cue:85:7 ··· 2384 2384 diff old new 2385 2385 --- old 2386 2386 +++ new 2387 + @@ -1,5 +1,5 @@ 2388 + Errors: 2389 + -closedByDefinition.err5.out.exports: conflicting values null and {exp1:"./main-module.js"} (mismatched types null and struct): 2390 + +closedByDefinition.err5.out.exports: conflicting values {exp1:"./main-module.js"} and null (mismatched types struct and null): 2391 + ./closedness.cue:80:13 2392 + ./closedness.cue:80:24 2393 + ./closedness.cue:85:7 2394 + @@ -17,7 +17,7 @@ 2395 + ./closedness.cue:82:26 2396 + ./closedness.cue:85:7 2397 + ./closedness.cue:86:18 2398 + -explicitClose.err1.out.a: conflicting values "all" and {baz:"notAllowed"} (mismatched types string and struct): 2399 + +explicitClose.err1.out.a: conflicting values {baz:"notAllowed"} and "all" (mismatched types struct and string): 2400 + ./closedness.cue:32:11 2401 + ./closedness.cue:32:12 2402 + ./closedness.cue:33:6 2403 + @@ -44,7 +44,7 @@ 2404 + ./in.cue:4:5 2405 + ./in.cue:8:28 2406 + ./in.cue:10:16 2407 + -openArguments.err2.out.a: conflicting values null and {allowed:"once"} (mismatched types null and struct): 2408 + +openArguments.err2.out.a: conflicting values {allowed:"once"} and null (mismatched types struct and null): 2409 + ./closedness.cue:20:11 2410 + ./closedness.cue:20:12 2411 + ./closedness.cue:21:13 2387 2412 @@ -61,10 +61,6 @@ 2388 2413 ./closedness.cue:36:6 2389 2414 explicitClose.err1.out.a.baz: field not allowed: ··· 2395 2420 ./closedness.cue:36:11 2396 2421 closedByDefinition.err5.out.exports: invalid value {exp1:"./main-module.js"} (does not satisfy matchN): 0 matched, expected 1: 2397 2422 ./closedness.cue:80:13 2423 + @@ -259,7 +255,7 @@ 2424 + out: (_|_){ 2425 + // [eval] 2426 + a: (_|_){ 2427 + - // [eval] openArguments.err2.out.a: conflicting values null and {allowed:"once"} (mismatched types null and struct): 2428 + + // [eval] openArguments.err2.out.a: conflicting values {allowed:"once"} and null (mismatched types struct and null): 2429 + // ./closedness.cue:20:11 2430 + // ./closedness.cue:20:12 2431 + // ./closedness.cue:21:13 2432 + @@ -292,7 +288,7 @@ 2433 + out: (_|_){ 2434 + // [eval] 2435 + a: (_|_){ 2436 + - // [eval] explicitClose.err1.out.a: conflicting values "all" and {baz:"notAllowed"} (mismatched types string and struct): 2437 + + // [eval] explicitClose.err1.out.a: conflicting values {baz:"notAllowed"} and "all" (mismatched types struct and string): 2438 + // ./closedness.cue:32:11 2439 + // ./closedness.cue:32:12 2440 + // ./closedness.cue:33:6 2441 + @@ -453,7 +449,7 @@ 2442 + out: (_|_){ 2443 + // [eval] 2444 + exports: (_|_){ 2445 + - // [eval] closedByDefinition.err5.out.exports: conflicting values null and {exp1:"./main-module.js"} (mismatched types null and struct): 2446 + + // [eval] closedByDefinition.err5.out.exports: conflicting values {exp1:"./main-module.js"} and null (mismatched types struct and null): 2447 + // ./closedness.cue:80:13 2448 + // ./closedness.cue:80:24 2449 + // ./closedness.cue:85:7 2398 2450 @@ -975,8 +971,8 @@ 2399 2451 run?: (string){ string } 2400 2452 }
+2 -2
cue/testdata/builtins/reclose.txtar
··· 197 197 Errors: 198 198 nonRecursive.y.err.f: field not allowed: 199 199 ./in.cue:48:15 200 - nonStructDefinitions.t2.err: conflicting values 1 and {b:1} (mismatched types int and struct): 200 + nonStructDefinitions.t2.err: conflicting values {b:1} and 1 (mismatched types struct and int): 201 201 ./in.cue:62:8 202 202 ./in.cue:70:11 203 203 ./in.cue:70:15 ··· 363 363 t2: (_|_){ 364 364 // [eval] 365 365 err: (_|_){ 366 - // [eval] nonStructDefinitions.t2.err: conflicting values 1 and {b:1} (mismatched types int and struct): 366 + // [eval] nonStructDefinitions.t2.err: conflicting values {b:1} and 1 (mismatched types struct and int): 367 367 // ./in.cue:62:8 368 368 // ./in.cue:70:11 369 369 // ./in.cue:70:15
+19 -37
cue/testdata/builtins/validators.txtar
··· 236 236 NumCloseIDs: 8 237 237 -- out/evalalpha -- 238 238 Errors: 239 - issue3474.topValidator.failType.A: conflicting values >10 and {C:1} (mismatched types number and struct): 239 + issue3474.topValidator.failType.A: conflicting values {C:1} and >10 (mismatched types struct and number): 240 240 ./issue3474.cue:53:5 241 241 ./issue3474.cue:53:16 242 242 ./issue3474.cue:54:5 ··· 287 287 issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN): 0 matched, expected 1: 288 288 ./issue3474.cue:53:5 289 289 ./issue3474.cue:53:12 290 - ./issue3474.cue:54:5 291 - issue3474.topValidator.failType.A: invalid operands {C:1} and 10 to '>' (type _|_ and int): 292 - ./issue3474.cue:53:16 293 - ./issue3474.cue:53:5 294 - ./issue3474.cue:53:17 295 290 ./issue3474.cue:54:5 296 291 297 292 Result: ··· 502 497 failType: (_|_){ 503 498 // [eval] 504 499 A: (_|_){ 505 - // [eval] issue3474.topValidator.failType.A: conflicting values >10 and {C:1} (mismatched types number and struct): 500 + // [eval] issue3474.topValidator.failType.A: conflicting values {C:1} and >10 (mismatched types struct and number): 506 501 // ./issue3474.cue:53:5 507 502 // ./issue3474.cue:53:16 508 503 // ./issue3474.cue:54:5 509 504 // issue3474.topValidator.failType.A: invalid value {C:1} (does not satisfy matchN): 0 matched, expected 1: 510 505 // ./issue3474.cue:53:5 511 506 // ./issue3474.cue:53:12 512 - // ./issue3474.cue:54:5 513 - // issue3474.topValidator.failType.A: invalid operands {C:1} and 10 to '>' (type _|_ and int): 514 - // ./issue3474.cue:53:16 515 - // ./issue3474.cue:53:5 516 - // ./issue3474.cue:53:17 517 507 // ./issue3474.cue:54:5 518 508 C: (int){ 1 } 519 509 } ··· 578 568 diff old new 579 569 --- old 580 570 +++ new 581 - @@ -51,6 +51,11 @@ 571 + @@ -1,5 +1,5 @@ 572 + Errors: 573 + -issue3474.topValidator.failType.A: conflicting values >10 and {C:1} (mismatched types number and struct): 574 + +issue3474.topValidator.failType.A: conflicting values {C:1} and >10 (mismatched types struct and number): 582 575 ./issue3474.cue:53:5 583 - ./issue3474.cue:53:12 576 + ./issue3474.cue:53:16 584 577 ./issue3474.cue:54:5 585 - +issue3474.topValidator.failType.A: invalid operands {C:1} and 10 to '>' (type _|_ and int): 586 - + ./issue3474.cue:53:16 587 - + ./issue3474.cue:53:5 588 - + ./issue3474.cue:53:17 589 - + ./issue3474.cue:54:5 590 - 591 - Result: 592 - (_|_){ 593 - @@ -142,10 +147,8 @@ 578 + @@ -142,10 +142,8 @@ 594 579 } 595 580 } 596 581 incomplete1: (_|_){ ··· 603 588 _a: (_|_){ 604 589 // [incomplete] issue2098.incomplete1._a: invalid value [] (does not satisfy list.MinItems(1)): len(list) < MinItems(1) (0 < 1): 605 590 // ./in.cue:112:6 606 - @@ -270,6 +273,11 @@ 591 + @@ -262,7 +260,7 @@ 592 + failType: (_|_){ 593 + // [eval] 594 + A: (_|_){ 595 + - // [eval] issue3474.topValidator.failType.A: conflicting values >10 and {C:1} (mismatched types number and struct): 596 + + // [eval] issue3474.topValidator.failType.A: conflicting values {C:1} and >10 (mismatched types struct and number): 607 597 // ./issue3474.cue:53:5 608 - // ./issue3474.cue:53:12 598 + // ./issue3474.cue:53:16 609 599 // ./issue3474.cue:54:5 610 - + // issue3474.topValidator.failType.A: invalid operands {C:1} and 10 to '>' (type _|_ and int): 611 - + // ./issue3474.cue:53:16 612 - + // ./issue3474.cue:53:5 613 - + // ./issue3474.cue:53:17 614 - + // ./issue3474.cue:54:5 615 - C: (int){ 1 } 616 - } 617 - } 618 - @@ -276,7 +284,7 @@ 600 + @@ -276,7 +274,7 @@ 619 601 } 620 602 } 621 603 issue3639: (struct){ ··· 624 606 b: (int){ 1 } 625 607 } 626 608 #X: (_){ matchN(1, (#list){ 627 - @@ -293,7 +301,7 @@ 609 + @@ -293,7 +291,7 @@ 628 610 // } 629 611 } 630 612 }) } ··· 633 615 b: (int){ 1 } 634 616 } 635 617 } 636 - @@ -308,10 +316,10 @@ 618 + @@ -308,10 +306,10 @@ 637 619 // } 638 620 } 639 621 }) } ··· 648 630 c: (string){ "c" } 649 631 } 650 632 } 651 - @@ -318,13 +326,13 @@ 633 + @@ -318,13 +316,13 @@ 652 634 issue3981: (struct){ 653 635 matchWithClose: (struct){ 654 636 out: (#struct){
+11 -15
cue/testdata/comprehensions/iferror.txtar
··· 162 162 NumCloseIDs: 7 163 163 -- out/evalalpha -- 164 164 Errors: 165 - issue1972.err1: conflicting values [...{}] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 166 - ./in.cue:53:8 167 - ./in.cue:55:3 165 + issue1972.err1: conflicting values {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} and [...{}] (mismatched types struct and list): 168 166 ./in.cue:61:8 169 167 ./in.cue:63:11 168 + ./in.cue:64:3 170 169 wrongConcreteType: cannot use 2 (type int) as type bool: 171 170 ./in.cue:4:2 172 171 ./in.cue:1:8 ··· 229 228 issue1972: (_|_){ 230 229 // [eval] 231 230 err1: (_|_){ 232 - // [eval] issue1972.err1: conflicting values [...{}] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 233 - // ./in.cue:53:8 234 - // ./in.cue:55:3 231 + // [eval] issue1972.err1: conflicting values {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} and [...{}] (mismatched types struct and list): 235 232 // ./in.cue:61:8 236 233 // ./in.cue:63:11 234 + // ./in.cue:64:3 237 235 #patchs: (_|_){// [] 238 236 } 239 237 #someCondition: (_){ _ } ··· 249 247 diff old new 250 248 --- old 251 249 +++ new 252 - @@ -1,7 +1,9 @@ 250 + @@ -1,7 +1,8 @@ 253 251 Errors: 254 252 -issue1972.err1: conflicting values [] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 255 253 - ./in.cue:54:12 256 - +issue1972.err1: conflicting values [...{}] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 257 - + ./in.cue:53:8 258 - + ./in.cue:55:3 254 + +issue1972.err1: conflicting values {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} and [...{}] (mismatched types struct and list): 259 255 ./in.cue:61:8 260 256 + ./in.cue:63:11 257 + + ./in.cue:64:3 261 258 wrongConcreteType: cannot use 2 (type int) as type bool: 262 259 ./in.cue:4:2 263 260 ./in.cue:1:8 264 - @@ -8,8 +10,6 @@ 261 + @@ -8,8 +9,6 @@ 265 262 wrongType: cannot use int (type int) as type bool: 266 263 ./in.cue:10:2 267 264 ./in.cue:1:14 ··· 270 267 271 268 Result: 272 269 (_|_){ 273 - @@ -66,17 +66,19 @@ 270 + @@ -66,17 +65,18 @@ 274 271 issue1972: (_|_){ 275 272 // [eval] 276 273 err1: (_|_){ 277 274 - // [eval] issue1972.err1: conflicting values [] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 278 275 - // ./in.cue:54:12 279 - + // [eval] issue1972.err1: conflicting values [...{}] and {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} (mismatched types list and struct): 280 - + // ./in.cue:53:8 281 - + // ./in.cue:55:3 276 + + // [eval] issue1972.err1: conflicting values {someCondition:_,patchs:[...{}],patchs,if someCondition {patchs:_}} and [...{}] (mismatched types struct and list): 282 277 // ./in.cue:61:8 283 278 - // issue1972.err1: invalid list index someCondition (type string): 284 279 - // ./in.cue:65:6 ··· 287 282 - someCondition: (_){ _ } 288 283 - patchs: (list){ 289 284 + // ./in.cue:63:11 285 + + // ./in.cue:64:3 290 286 + #patchs: (_|_){// [] 291 287 } 292 288 #someCondition: (_){ _ }
+2 -2
cue/testdata/comprehensions/issue3929.txtar
··· 99 99 100 100 NumCloseIDs: 99 101 101 102 - ConjunctInfos: 156 102 + ConjunctInfos: 157 103 103 MaxConjunctInfos: 6 104 104 MaxReqSets: 13 105 105 MaxRedirect: 3 ··· 133 133 + 134 134 +NumCloseIDs: 99 135 135 + 136 - +ConjunctInfos: 156 136 + +ConjunctInfos: 157 137 137 +MaxConjunctInfos: 6 138 138 +MaxReqSets: 13 139 139 +MaxRedirect: 3
+125
cue/testdata/cycle/disjunction.txtar
··· 94 94 Unifications: 93 95 95 Conjuncts: 280 96 96 Disjuncts: 199 97 + -- out/evalalpha -- 98 + Errors: 99 + cycle.a: structural cycle 100 + issue3042.data: 2 errors in empty disjunction: 101 + issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and [...#nesting] (mismatched types struct and list): 102 + ./issue3042.cue:5:57 103 + ./issue3042.cue:7:8 104 + ./issue3042.cue:7:19 105 + issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and string (mismatched types struct and string): 106 + ./issue3042.cue:5:12 107 + ./issue3042.cue:7:8 108 + ./issue3042.cue:7:19 109 + 110 + Result: 111 + (_|_){ 112 + // [eval] 113 + cycle: (_|_){ 114 + // [structural cycle] 115 + a: (_|_){ 116 + // [structural cycle] cycle.a: structural cycle 117 + } 118 + } 119 + r1a: (int){ int } 120 + r1b: (int){ int } 121 + r2a: (int){ 1 } 122 + r2b: (int){ 1 } 123 + r3a: (null){ null } 124 + r3b: (null){ null } 125 + r4a: (struct){ 126 + } 127 + r4b: (struct){ 128 + } 129 + r5a: (#list){ 130 + } 131 + r5b: (#list){ 132 + } 133 + s1a: (struct){ 134 + x: (int){ int } 135 + } 136 + s1b: (struct){ 137 + x: (int){ int } 138 + } 139 + s2a: (struct){ 140 + x: (int){ 1 } 141 + } 142 + s2b: (struct){ 143 + x: (int){ 1 } 144 + } 145 + s3a: (struct){ 146 + x: (null){ null } 147 + } 148 + s3b: (struct){ 149 + x: (null){ null } 150 + } 151 + s4a: (struct){ 152 + x: (struct){ 153 + } 154 + } 155 + s4b: (struct){ 156 + x: (struct){ 157 + } 158 + } 159 + s5a: (struct){ 160 + x: (#list){ 161 + } 162 + } 163 + s5b: (struct){ 164 + x: (#list){ 165 + } 166 + } 167 + issue3042: (_|_){ 168 + // [eval] 169 + #foo: (string){ =~"^foo" } 170 + #nesting: ((string|list|struct)){ |((string){ string }, (#struct){ 171 + name?: (string){ =~"^foo" } 172 + }, (list){ 173 + }) } 174 + data: (_|_){ 175 + // [eval] issue3042.data: 2 errors in empty disjunction: 176 + // issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and [...#nesting] (mismatched types struct and list): 177 + // ./issue3042.cue:5:57 178 + // ./issue3042.cue:7:8 179 + // ./issue3042.cue:7:19 180 + // issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and string (mismatched types struct and string): 181 + // ./issue3042.cue:5:12 182 + // ./issue3042.cue:7:8 183 + // ./issue3042.cue:7:19 184 + secret: (struct){ 185 + infra: (list){ list } 186 + } 187 + } 188 + } 189 + } 190 + -- diff/-out/evalalpha<==>+out/eval -- 191 + diff old new 192 + --- old 193 + +++ new 194 + @@ -1,11 +1,11 @@ 195 + Errors: 196 + cycle.a: structural cycle 197 + issue3042.data: 2 errors in empty disjunction: 198 + -issue3042.data: conflicting values [...#nesting] and {secret:{infra:[{name:"bar1"}]}} (mismatched types list and struct): 199 + +issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and [...#nesting] (mismatched types struct and list): 200 + ./issue3042.cue:5:57 201 + ./issue3042.cue:7:8 202 + ./issue3042.cue:7:19 203 + -issue3042.data: conflicting values string and {secret:{infra:[{name:"bar1"}]}} (mismatched types string and struct): 204 + +issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and string (mismatched types struct and string): 205 + ./issue3042.cue:5:12 206 + ./issue3042.cue:7:8 207 + ./issue3042.cue:7:19 208 + @@ -76,11 +76,11 @@ 209 + }) } 210 + data: (_|_){ 211 + // [eval] issue3042.data: 2 errors in empty disjunction: 212 + - // issue3042.data: conflicting values [...#nesting] and {secret:{infra:[{name:"bar1"}]}} (mismatched types list and struct): 213 + + // issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and [...#nesting] (mismatched types struct and list): 214 + // ./issue3042.cue:5:57 215 + // ./issue3042.cue:7:8 216 + // ./issue3042.cue:7:19 217 + - // issue3042.data: conflicting values string and {secret:{infra:[{name:"bar1"}]}} (mismatched types string and struct): 218 + + // issue3042.data: conflicting values {secret:{infra:[{name:"bar1"}]}} and string (mismatched types struct and string): 219 + // ./issue3042.cue:5:12 220 + // ./issue3042.cue:7:8 221 + // ./issue3042.cue:7:19 97 222 -- out/eval -- 98 223 Errors: 99 224 cycle.a: structural cycle
+8 -8
cue/testdata/cycle/issue3570.txtar
··· 15 15 -- out/evalalpha -- 16 16 Errors: 17 17 2 errors in empty disjunction: 18 - conflicting values 25 and {foo:(25|44)} (mismatched types int and struct): 19 - ./in.cue:1:6 18 + conflicting values {foo:{foo:(25|44)},foo,foo:foo} and 25 (mismatched types struct and int): 19 + ./in.cue:1:1 20 20 ./in.cue:1:11 21 21 ./in.cue:2:1 22 - conflicting values 44 and {foo:(25|44)} (mismatched types int and struct): 23 - ./in.cue:1:6 22 + conflicting values {foo:{foo:(25|44)},foo,foo:foo} and 44 (mismatched types struct and int): 23 + ./in.cue:1:1 24 24 ./in.cue:1:16 25 25 ./in.cue:2:1 26 26 27 27 Result: 28 28 (_|_){ 29 29 // [eval] 2 errors in empty disjunction: 30 - // conflicting values 25 and {foo:(25|44)} (mismatched types int and struct): 31 - // ./in.cue:1:6 30 + // conflicting values {foo:{foo:(25|44)},foo,foo:foo} and 25 (mismatched types struct and int): 31 + // ./in.cue:1:1 32 32 // ./in.cue:1:11 33 33 // ./in.cue:2:1 34 - // conflicting values 44 and {foo:(25|44)} (mismatched types int and struct): 35 - // ./in.cue:1:6 34 + // conflicting values {foo:{foo:(25|44)},foo,foo:foo} and 44 (mismatched types struct and int): 35 + // ./in.cue:1:1 36 36 // ./in.cue:1:16 37 37 // ./in.cue:2:1 38 38 foo: (struct){
+95 -59
cue/testdata/cycle/structural.txtar
··· 672 672 e3.b: conflicting values [b] and {c:b} (mismatched types list and struct): 673 673 ./in.cue:415:5 674 674 ./in.cue:416:5 675 - e4.a.0: 4 errors in empty disjunction: 675 + e4.a.0: 2 errors in empty disjunction: 676 676 e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 677 677 ./in.cue:420:10 678 678 ./in.cue:421:6 679 - e4.a.0.0: 2 errors in empty disjunction: 680 - e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 679 + e4.a.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 681 680 ./in.cue:420:6 682 681 ./in.cue:421:6 683 682 ./in.cue:421:7 684 - e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 685 - ./in.cue:420:6 686 - ./in.cue:420:10 687 - ./in.cue:421:6 688 - e4.b.0: 4 errors in empty disjunction: 683 + e4.b.0: 2 errors in empty disjunction: 689 684 e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 690 685 ./in.cue:423:6 691 686 ./in.cue:424:10 692 - e4.b.0.0: 2 errors in empty disjunction: 693 - e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 687 + e4.b.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 694 688 ./in.cue:423:6 695 689 ./in.cue:423:7 696 690 ./in.cue:424:6 697 - e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 698 - ./in.cue:423:6 699 - ./in.cue:424:6 700 - ./in.cue:424:10 701 691 issue2545.#B.A: structural cycle 702 692 nestedList.v1e.y.0: 4 errors in empty disjunction: 703 693 nestedList.v1e.y.0: conflicting values [[2],1] and int (mismatched types list and int): ··· 1499 1489 a: (_|_){ 1500 1490 // [eval] 1501 1491 0: (_|_){ 1502 - // [eval] e4.a.0: 4 errors in empty disjunction: 1492 + // [eval] e4.a.0: 2 errors in empty disjunction: 1503 1493 // e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1504 1494 // ./in.cue:420:10 1505 1495 // ./in.cue:421:6 1506 - // e4.a.0.0: 2 errors in empty disjunction: 1507 - // e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 1496 + // e4.a.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 1508 1497 // ./in.cue:420:6 1509 1498 // ./in.cue:421:6 1510 1499 // ./in.cue:421:7 1511 - // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1512 - // ./in.cue:420:6 1513 - // ./in.cue:420:10 1514 - // ./in.cue:421:6 1515 1500 0: (struct){ 1516 1501 c: (int){ 1 } 1517 1502 } ··· 1520 1505 b: (_|_){ 1521 1506 // [eval] 1522 1507 0: (_|_){ 1523 - // [eval] e4.b.0: 4 errors in empty disjunction: 1508 + // [eval] e4.b.0: 2 errors in empty disjunction: 1524 1509 // e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1525 1510 // ./in.cue:423:6 1526 1511 // ./in.cue:424:10 1527 - // e4.b.0.0: 2 errors in empty disjunction: 1528 - // e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 1512 + // e4.b.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 1529 1513 // ./in.cue:423:6 1530 1514 // ./in.cue:423:7 1531 1515 // ./in.cue:424:6 1532 - // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1533 - // ./in.cue:423:6 1534 - // ./in.cue:424:6 1535 - // ./in.cue:424:10 1536 1516 0: (struct){ 1537 1517 c: (int){ 1 } 1538 1518 } ··· 1854 1834 e1.a.c: structural cycle 1855 1835 e1.b.c: structural cycle 1856 1836 e2.a.c: structural cycle 1857 - @@ -27,18 +35,17 @@ 1837 + @@ -27,70 +35,64 @@ 1858 1838 e3.a: conflicting values [a] and {c:a} (mismatched types list and struct): 1859 1839 ./in.cue:412:5 1860 1840 ./in.cue:413:5 ··· 1863 1843 ./in.cue:415:5 1864 1844 ./in.cue:416:5 1865 1845 -e3.b.c: structural cycle 1866 - e4.a.0: 4 errors in empty disjunction: 1846 + -e4.a.0: 4 errors in empty disjunction: 1847 + +e4.a.0: 2 errors in empty disjunction: 1867 1848 e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1868 1849 ./in.cue:420:10 1869 1850 ./in.cue:421:6 1870 - e4.a.0.0: 2 errors in empty disjunction: 1851 + -e4.a.0.0: 2 errors in empty disjunction: 1871 1852 -e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct): 1872 1853 - ./in.cue:421:5 1873 - +e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 1874 - + ./in.cue:420:6 1854 + - ./in.cue:421:7 1855 + -e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1856 + +e4.a.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 1857 + ./in.cue:420:6 1858 + - ./in.cue:420:10 1859 + - ./in.cue:421:6 1860 + -e4.b.0: 4 errors in empty disjunction: 1875 1861 + ./in.cue:421:6 1876 - ./in.cue:421:7 1877 - e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1878 - ./in.cue:420:6 1879 - @@ -49,9 +56,10 @@ 1862 + + ./in.cue:421:7 1863 + +e4.b.0: 2 errors in empty disjunction: 1864 + e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1880 1865 ./in.cue:423:6 1881 1866 ./in.cue:424:10 1882 - e4.b.0.0: 2 errors in empty disjunction: 1867 + -e4.b.0.0: 2 errors in empty disjunction: 1883 1868 -e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct): 1884 - +e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 1869 + +e4.b.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 1885 1870 + ./in.cue:423:6 1886 1871 ./in.cue:423:7 1887 1872 - ./in.cue:424:5 1888 - + ./in.cue:424:6 1889 - e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1890 - ./in.cue:423:6 1873 + -e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 1874 + - ./in.cue:423:6 1891 1875 ./in.cue:424:6 1892 - @@ -58,39 +66,43 @@ 1893 - ./in.cue:424:10 1876 + - ./in.cue:424:10 1894 1877 issue2545.#B.A: structural cycle 1895 1878 nestedList.v1e.y.0: 4 errors in empty disjunction: 1896 1879 -nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list): ··· 1951 1934 1952 1935 Result: 1953 1936 (_|_){ 1954 - @@ -101,13 +113,9 @@ 1937 + @@ -101,13 +103,9 @@ 1955 1938 // [structural cycle] 1956 1939 X: (_|_){ 1957 1940 // [structural cycle] ··· 1968 1951 } 1969 1952 } 1970 1953 } 1971 - @@ -402,7 +410,11 @@ 1954 + @@ -402,7 +400,11 @@ 1972 1955 value: (int){ 3 } 1973 1956 tail: (#struct){ 1974 1957 value: (int){ 4 } ··· 1981 1964 sum: (int){ 4 } 1982 1965 } 1983 1966 sum: (int){ 7 } 1984 - @@ -686,20 +698,19 @@ 1967 + @@ -686,20 +688,19 @@ 1985 1968 } 1986 1969 x: (_|_){ 1987 1970 // [structural cycle] ··· 2006 1989 } 2007 1990 } 2008 1991 shortPathFail: (_|_){ 2009 - @@ -714,9 +725,7 @@ 1992 + @@ -714,9 +715,7 @@ 2010 1993 // [structural cycle] 2011 1994 t1: (struct){ 2012 1995 #Foo: (#struct){ ··· 2017 2000 } 2018 2001 } 2019 2002 t2: (_|_){ 2020 - @@ -731,9 +740,7 @@ 2003 + @@ -731,9 +730,7 @@ 2021 2004 } 2022 2005 comprehension: (struct){ 2023 2006 #list: (#struct){ ··· 2028 2011 } 2029 2012 } 2030 2013 } 2031 - @@ -759,8 +766,7 @@ 2014 + @@ -759,8 +756,7 @@ 2032 2015 } 2033 2016 } 2034 2017 let _schema_1#1 = (_|_){ ··· 2038 2021 } 2039 2022 } 2040 2023 fieldsSumInfinite: (_|_){ 2041 - @@ -839,11 +845,9 @@ 2024 + @@ -839,11 +835,9 @@ 2042 2025 // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct): 2043 2026 // ./in.cue:412:5 2044 2027 // ./in.cue:413:5 ··· 2053 2036 } 2054 2037 } 2055 2038 b: (_|_){ 2056 - @@ -850,11 +854,9 @@ 2039 + @@ -850,11 +844,9 @@ 2057 2040 // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct): 2058 2041 // ./in.cue:415:5 2059 2042 // ./in.cue:416:5 ··· 2068 2051 } 2069 2052 } 2070 2053 } 2071 - @@ -957,10 +959,9 @@ 2054 + @@ -863,40 +855,30 @@ 2055 + a: (_|_){ 2056 + // [eval] 2057 + 0: (_|_){ 2058 + - // [eval] e4.a.0: 4 errors in empty disjunction: 2059 + + // [eval] e4.a.0: 2 errors in empty disjunction: 2060 + // e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 2061 + // ./in.cue:420:10 2062 + // ./in.cue:421:6 2063 + - // e4.a.0.0: 2 errors in empty disjunction: 2064 + - // e4.a.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 2065 + + // e4.a.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 2066 + // ./in.cue:420:6 2067 + // ./in.cue:421:6 2068 + // ./in.cue:421:7 2069 + - // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 2070 + - // ./in.cue:420:6 2071 + - // ./in.cue:420:10 2072 + - // ./in.cue:421:6 2073 + - 0: (struct){ 2074 + - c: (int){ 1 } 2075 + - } 2076 + - } 2077 + - } 2078 + - b: (_|_){ 2079 + - // [eval] 2080 + - 0: (_|_){ 2081 + - // [eval] e4.b.0: 4 errors in empty disjunction: 2082 + + 0: (struct){ 2083 + + c: (int){ 1 } 2084 + + } 2085 + + } 2086 + + } 2087 + + b: (_|_){ 2088 + + // [eval] 2089 + + 0: (_|_){ 2090 + + // [eval] e4.b.0: 2 errors in empty disjunction: 2091 + // e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 2092 + // ./in.cue:423:6 2093 + // ./in.cue:424:10 2094 + - // e4.b.0.0: 2 errors in empty disjunction: 2095 + - // e4.b.0.0: conflicting values [{c:1}] and {c:1} (mismatched types list and struct): 2096 + + // e4.b.0.0: conflicting values {c:1} and [{c:1}] (mismatched types struct and list): 2097 + // ./in.cue:423:6 2098 + // ./in.cue:423:7 2099 + // ./in.cue:424:6 2100 + - // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct): 2101 + - // ./in.cue:423:6 2102 + - // ./in.cue:424:6 2103 + - // ./in.cue:424:10 2104 + 0: (struct){ 2105 + c: (int){ 1 } 2106 + } 2107 + @@ -957,10 +939,9 @@ 2072 2108 // ./in.cue:443:12 2073 2109 // ./in.cue:444:7 2074 2110 // ./in.cue:444:11 ··· 2082 2118 1: (int){ 1 } 2083 2119 } 2084 2120 1: (int){ 1 } 2085 - @@ -1075,13 +1076,12 @@ 2121 + @@ -1075,13 +1056,12 @@ 2086 2122 // [structural cycle] 2087 2123 f: (_|_){ 2088 2124 // [structural cycle] ··· 2101 2137 } 2102 2138 } 2103 2139 } 2104 - @@ -1092,11 +1092,8 @@ 2140 + @@ -1092,11 +1072,8 @@ 2105 2141 y: (_){ _ } 2106 2142 } 2107 2143 C: (struct){ ··· 2115 2151 } 2116 2152 } 2117 2153 t2: (struct){ 2118 - @@ -1105,11 +1102,8 @@ 2154 + @@ -1105,11 +1082,8 @@ 2119 2155 y: (_){ _ } 2120 2156 } 2121 2157 C: (struct){ ··· 2129 2165 } 2130 2166 } 2131 2167 t3: (struct){ 2132 - @@ -1119,13 +1113,9 @@ 2168 + @@ -1119,13 +1093,9 @@ 2133 2169 z: (_){ _ } 2134 2170 } 2135 2171 C: (struct){ ··· 2146 2182 } 2147 2183 } 2148 2184 t4: (struct){ 2149 - @@ -1136,13 +1126,9 @@ 2185 + @@ -1136,13 +1106,9 @@ 2150 2186 } 2151 2187 C: (struct){ 2152 2188 x: (struct){ ··· 2163 2199 } 2164 2200 y: ~(crossRefNoCycle.t4.C.x) 2165 2201 z: ~(crossRefNoCycle.t4.C.x) 2166 - @@ -1180,19 +1166,19 @@ 2202 + @@ -1180,19 +1146,19 @@ 2167 2203 } 2168 2204 } 2169 2205 n4: (struct){
+10 -7
cue/testdata/definitions/typocheck.txtar
··· 641 641 642 642 NumCloseIDs: 440 643 643 644 - ConjunctInfos: 1118 644 + ConjunctInfos: 1132 645 645 MaxConjunctInfos: 5 646 646 MaxReqSets: 9 647 647 MaxRedirect: 2 ··· 674 674 + 675 675 +NumCloseIDs: 440 676 676 + 677 - +ConjunctInfos: 1118 677 + +ConjunctInfos: 1132 678 678 +MaxConjunctInfos: 5 679 679 +MaxReqSets: 9 680 680 +MaxRedirect: 2 ··· 1958 1958 out: (#struct){ 1959 1959 b1: (_|_){ 1960 1960 // [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 1961 - // disjunction.withErr.t1.out.b1: conflicting values null and {b2:{b3:params.mayExistLater}} (mismatched types null and struct): 1961 + // disjunction.withErr.t1.out.b1: conflicting values {b2:{b3:params.mayExistLater}} and null (mismatched types struct and null): 1962 1962 // ./validators.cue:32:7 1963 1963 // ./validators.cue:33:7 1964 1964 // ./validators.cue:35:17 1965 1965 // disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 1966 - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 1966 + // disjunction.withErr.t1.out.b1.b2: conflicting values {b3:params.mayExistLater} and null (mismatched types struct and null): 1967 1967 // ./validators.cue:32:7 1968 1968 // ./validators.cue:33:11 1969 1969 // ./validators.cue:35:24 ··· 2792 2792 } 2793 2793 } 2794 2794 out: (#struct){ 2795 - @@ -1415,25 +1266,19 @@ 2795 + @@ -1414,26 +1265,20 @@ 2796 + out: (#struct){ 2796 2797 b1: (_|_){ 2797 2798 // [incomplete] disjunction.withErr.t1.out.b1: 4 errors in empty disjunction: 2798 - // disjunction.withErr.t1.out.b1: conflicting values null and {b2:{b3:params.mayExistLater}} (mismatched types null and struct): 2799 + - // disjunction.withErr.t1.out.b1: conflicting values null and {b2:{b3:params.mayExistLater}} (mismatched types null and struct): 2800 + + // disjunction.withErr.t1.out.b1: conflicting values {b2:{b3:params.mayExistLater}} and null (mismatched types struct and null): 2799 2801 + // ./validators.cue:32:7 2800 2802 // ./validators.cue:33:7 2801 2803 // ./validators.cue:35:17 2802 2804 // disjunction.withErr.t1.out.b1.b2: 2 errors in empty disjunction: 2803 - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 2805 + - // disjunction.withErr.t1.out.b1.b2: conflicting values null and {b3:params.mayExistLater} (mismatched types null and struct): 2806 + + // disjunction.withErr.t1.out.b1.b2: conflicting values {b3:params.mayExistLater} and null (mismatched types struct and null): 2804 2807 + // ./validators.cue:32:7 2805 2808 // ./validators.cue:33:11 2806 2809 + // ./validators.cue:35:24
+12 -12
cue/testdata/disjunctions/discriminator.txtar
··· 117 117 ./in.cue:69:8 118 118 ./in.cue:69:19 119 119 byKind.nullableStructOptional.out.f1: 6 errors in empty disjunction: 120 - byKind.nullableStructOptional.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 120 + byKind.nullableStructOptional.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 121 121 ./in.cue:55:16 122 122 ./in.cue:60:8 123 123 ./in.cue:60:21 124 124 byKind.nullableStructOptional.out.f1.f2: 4 errors in empty disjunction: 125 - byKind.nullableStructOptional.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 125 + byKind.nullableStructOptional.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 126 126 ./in.cue:55:23 127 127 ./in.cue:56:16 128 128 ./in.cue:60:8 ··· 141 141 ./in.cue:60:8 142 142 ./in.cue:60:29 143 143 byKind.nullableStructRegular.out.f1: 6 errors in empty disjunction: 144 - byKind.nullableStructRegular.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 144 + byKind.nullableStructRegular.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 145 145 ./in.cue:37:15 146 146 ./in.cue:42:8 147 147 ./in.cue:42:21 148 148 byKind.nullableStructRegular.out.f1.f2: 4 errors in empty disjunction: 149 - byKind.nullableStructRegular.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 149 + byKind.nullableStructRegular.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 150 150 ./in.cue:37:22 151 151 ./in.cue:38:15 152 152 ./in.cue:42:8 ··· 165 165 ./in.cue:42:8 166 166 ./in.cue:42:29 167 167 byKind.nullableStructRequired.out.f1: 6 errors in empty disjunction: 168 - byKind.nullableStructRequired.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 168 + byKind.nullableStructRequired.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 169 169 ./in.cue:46:16 170 170 ./in.cue:51:8 171 171 ./in.cue:51:21 172 172 byKind.nullableStructRequired.out.f1.f2: 4 errors in empty disjunction: 173 - byKind.nullableStructRequired.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 173 + byKind.nullableStructRequired.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 174 174 ./in.cue:46:23 175 175 ./in.cue:47:16 176 176 ./in.cue:51:8 ··· 341 341 // [eval] 342 342 f1: (_|_){ 343 343 // [eval] byKind.nullableStructRegular.out.f1: 6 errors in empty disjunction: 344 - // byKind.nullableStructRegular.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 344 + // byKind.nullableStructRegular.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 345 345 // ./in.cue:37:15 346 346 // ./in.cue:42:8 347 347 // ./in.cue:42:21 348 348 // byKind.nullableStructRegular.out.f1.f2: 4 errors in empty disjunction: 349 - // byKind.nullableStructRegular.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 349 + // byKind.nullableStructRegular.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 350 350 // ./in.cue:37:22 351 351 // ./in.cue:38:15 352 352 // ./in.cue:42:8 ··· 391 391 // [eval] 392 392 f1: (_|_){ 393 393 // [eval] byKind.nullableStructRequired.out.f1: 6 errors in empty disjunction: 394 - // byKind.nullableStructRequired.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 394 + // byKind.nullableStructRequired.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 395 395 // ./in.cue:46:16 396 396 // ./in.cue:51:8 397 397 // ./in.cue:51:21 398 398 // byKind.nullableStructRequired.out.f1.f2: 4 errors in empty disjunction: 399 - // byKind.nullableStructRequired.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 399 + // byKind.nullableStructRequired.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 400 400 // ./in.cue:46:23 401 401 // ./in.cue:47:16 402 402 // ./in.cue:51:8 ··· 441 441 // [eval] 442 442 f1: (_|_){ 443 443 // [eval] byKind.nullableStructOptional.out.f1: 6 errors in empty disjunction: 444 - // byKind.nullableStructOptional.out.f1: conflicting values null and {f2:{f3:"not an int"}} (mismatched types null and struct): 444 + // byKind.nullableStructOptional.out.f1: conflicting values {f2:{f3:"not an int"}} and null (mismatched types struct and null): 445 445 // ./in.cue:55:16 446 446 // ./in.cue:60:8 447 447 // ./in.cue:60:21 448 448 // byKind.nullableStructOptional.out.f1.f2: 4 errors in empty disjunction: 449 - // byKind.nullableStructOptional.out.f1.f2: conflicting values null and {f3:"not an int"} (mismatched types null and struct): 449 + // byKind.nullableStructOptional.out.f1.f2: conflicting values {f3:"not an int"} and null (mismatched types struct and null): 450 450 // ./in.cue:55:23 451 451 // ./in.cue:56:16 452 452 // ./in.cue:60:8
+12 -6
cue/testdata/eval/disjunctions.txtar
··· 397 397 ./in.cue:15:4 398 398 ./in.cue:15:27 399 399 issue3606.data: 2 errors in empty disjunction: 400 - issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 400 + issue3606.data: conflicting values {notAllowed:true} and string (mismatched types struct and string): 401 401 ./dependencies.cue:2:8 402 402 ./dependencies.cue:4:6 403 403 ./dependencies.cue:6:6 ··· 411 411 // [eval] 412 412 data: (_|_){ 413 413 // [eval] issue3606.data: 2 errors in empty disjunction: 414 - // issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 414 + // issue3606.data: conflicting values {notAllowed:true} and string (mismatched types struct and string): 415 415 // ./dependencies.cue:2:8 416 416 // ./dependencies.cue:4:6 417 417 // ./dependencies.cue:6:6 ··· 877 877 diff old new 878 878 --- old 879 879 +++ new 880 - @@ -11,11 +11,10 @@ 880 + @@ -9,13 +9,12 @@ 881 + ./in.cue:15:4 882 + ./in.cue:15:27 881 883 issue3606.data: 2 errors in empty disjunction: 882 - issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 884 + -issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 885 + +issue3606.data: conflicting values {notAllowed:true} and string (mismatched types struct and string): 883 886 ./dependencies.cue:2:8 884 887 + ./dependencies.cue:4:6 885 888 ./dependencies.cue:6:6 ··· 890 893 891 894 Result: 892 895 (_|_){ 893 - @@ -26,17 +25,11 @@ 896 + @@ -24,19 +23,13 @@ 897 + // [eval] 898 + data: (_|_){ 894 899 // [eval] issue3606.data: 2 errors in empty disjunction: 895 - // issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 900 + - // issue3606.data: conflicting values string and {notAllowed:true} (mismatched types string and struct): 901 + + // issue3606.data: conflicting values {notAllowed:true} and string (mismatched types struct and string): 896 902 // ./dependencies.cue:2:8 897 903 + // ./dependencies.cue:4:6 898 904 // ./dependencies.cue:6:6
+12 -13
cue/testdata/eval/issue3330.txtar
··· 48 48 -- out/evalalpha -- 49 49 Errors: 50 50 eliminated.x: 2 errors in empty disjunction: 51 - eliminated.x: conflicting values null and {} (mismatched types null and struct): 52 - ./in.cue:21:10 51 + eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 53 52 ./in.cue:22:5 54 53 ./in.cue:23:5 54 + ./in.cue:23:14 55 55 eliminated.x.n: field not allowed: 56 56 ./in.cue:22:14 57 57 ./in.cue:23:16 ··· 77 77 } 78 78 x: (_|_){ 79 79 // [eval] eliminated.x: 2 errors in empty disjunction: 80 - // eliminated.x: conflicting values null and {} (mismatched types null and struct): 81 - // ./in.cue:21:10 80 + // eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 82 81 // ./in.cue:22:5 83 82 // ./in.cue:23:5 83 + // ./in.cue:23:14 84 84 // eliminated.x.n: field not allowed: 85 85 // ./in.cue:22:14 86 86 // ./in.cue:23:16 ··· 88 88 } 89 89 out: (_|_){ 90 90 // [eval] eliminated.x: 2 errors in empty disjunction: 91 - // eliminated.x: conflicting values null and {} (mismatched types null and struct): 92 - // ./in.cue:21:10 91 + // eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 93 92 // ./in.cue:22:5 94 93 // ./in.cue:23:5 94 + // ./in.cue:23:14 95 95 // eliminated.x.n: field not allowed: 96 96 // ./in.cue:22:14 97 97 // ./in.cue:23:16 ··· 122 122 Errors: 123 123 eliminated.x: 2 errors in empty disjunction: 124 124 -eliminated.x: conflicting values null and {n:3} (mismatched types null and struct): 125 - +eliminated.x: conflicting values null and {} (mismatched types null and struct): 126 - + ./in.cue:21:10 125 + +eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 127 126 ./in.cue:22:5 128 - - ./in.cue:23:14 129 127 + ./in.cue:23:5 128 + ./in.cue:23:14 130 129 eliminated.x.n: field not allowed: 131 130 - ./in.cue:21:10 132 131 ./in.cue:22:14 ··· 168 167 - // ./in.cue:23:5 169 168 - // ./in.cue:23:16 170 169 - } 171 - + // eliminated.x: conflicting values null and {} (mismatched types null and struct): 172 - + // ./in.cue:21:10 170 + + // eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 173 171 + // ./in.cue:22:5 174 172 + // ./in.cue:23:5 173 + + // ./in.cue:23:14 175 174 + // eliminated.x.n: field not allowed: 176 175 + // ./in.cue:22:14 177 176 + // ./in.cue:23:16 ··· 186 185 - // ./in.cue:21:10 187 186 - // ./in.cue:22:14 188 187 - // ./in.cue:23:5 189 - + // eliminated.x: conflicting values null and {} (mismatched types null and struct): 190 - + // ./in.cue:21:10 188 + + // eliminated.x: conflicting values {n:3} and null (mismatched types struct and null): 191 189 + // ./in.cue:22:5 192 190 + // ./in.cue:23:5 191 + + // ./in.cue:23:14 193 192 + // eliminated.x.n: field not allowed: 194 193 + // ./in.cue:22:14 195 194 // ./in.cue:23:16
+30 -131
cue/testdata/eval/issue3672.txtar
··· 686 686 0: (string){ 687 687 "UseSectionName" 688 688 let INL#9 = (_|_){ 689 - // [eval] value0.xs.0.INL: 2 errors in empty disjunction: 690 - // value0.xs.0.INL: 5 errors in empty disjunction: 691 - // value0.xs.0.INL: 6 errors in empty disjunction: 692 - // value0.xs.0.INL: conflicting values [...] and string (mismatched types list and string): 693 - // ./x.cue:22:51 694 - // ./x.cue:22:52 695 - // ./x.cue:28:12 696 - // ./x.cue:44:29 697 - // ./x.cue:51:14 698 - // ./x.cue:53:18 699 - // ./x.cue:55:19 700 - // ./x.cue:62:25 701 - // ./x.cue:70:12 702 - // ./x.cue:70:47 703 - // ./x.cue:109:13 704 - // ./x.cue:111:13 705 - // ./x.cue:111:18 706 - // ./x.cue:123:9 707 - // value0.xs.0.INL: conflicting values [...] and {Append:#ConfigText} (mismatched types list and struct): 708 - // ./x.cue:22:51 709 - // ./x.cue:22:52 710 - // ./x.cue:28:12 711 - // ./x.cue:44:29 712 - // ./x.cue:53:32 713 - // ./x.cue:55:19 714 - // ./x.cue:62:25 715 - // ./x.cue:70:12 716 - // ./x.cue:70:47 717 - // ./x.cue:109:13 718 - // ./x.cue:111:13 719 - // ./x.cue:111:18 720 - // ./x.cue:123:9 721 - // value0.xs.0.INL: conflicting values [...] and {Prepend:#ConfigText} (mismatched types list and struct): 689 + // [eval] value0.xs.0.INL: conflicting values [...] and {UseSectionName:true} (mismatched types list and struct): 722 690 // ./x.cue:22:51 723 691 // ./x.cue:22:52 724 - // ./x.cue:28:12 725 692 // ./x.cue:44:29 726 - // ./x.cue:53:56 727 - // ./x.cue:55:19 728 - // ./x.cue:62:25 729 - // ./x.cue:70:12 730 - // ./x.cue:70:47 731 - // ./x.cue:109:13 732 - // ./x.cue:111:13 733 - // ./x.cue:111:18 734 - // ./x.cue:123:9 735 - // value0.xs.0.INL: conflicting values [...] and {UseSectionName:true} (mismatched types list and struct): 736 - // ./x.cue:22:51 737 - // ./x.cue:22:52 738 - // ./x.cue:28:12 739 - // ./x.cue:44:29 740 - // ./x.cue:51:23 741 - // ./x.cue:53:18 742 - // ./x.cue:55:19 693 + // ./x.cue:44:56 743 694 // ./x.cue:62:25 744 695 // ./x.cue:70:12 745 696 // ./x.cue:70:47 746 - // ./x.cue:109:13 747 697 // ./x.cue:111:13 748 698 // ./x.cue:111:18 749 699 // ./x.cue:123:9 700 + // ./x.cue:124:16 750 701 UseSectionName: (_|_){ 751 702 // [cycle] cycle error 752 703 } 753 704 } 754 705 let INA#7 = (_|_){ 755 706 // [eval] value0.xs.0.INA: 3 errors in empty disjunction: 756 - // value0.xs.0.INA: conflicting values {Prepend:#ConfigText} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 707 + // value0.xs.0.INA: conflicting values {Append:_} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 757 708 // ./x.cue:22:51 758 709 // ./x.cue:22:52 759 710 // ./x.cue:44:29 760 - // ./x.cue:53:56 761 711 // ./x.cue:55:37 762 712 // ./x.cue:62:25 763 713 // ./x.cue:70:12 764 714 // ./x.cue:92:13 765 715 // ./x.cue:94:13 716 + // ./x.cue:94:18 766 717 // ./x.cue:109:13 767 718 // ./x.cue:112:3 768 719 // ./x.cue:118:4 ··· 777 728 } 778 729 let INP#8 = (_|_){ 779 730 // [eval] value0.xs.0.INP: 2 errors in empty disjunction: 780 - // value0.xs.0.INP: conflicting values {Prepend:#ConfigText} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 731 + // value0.xs.0.INP: conflicting values {Prepend:_} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 781 732 // ./x.cue:22:51 782 733 // ./x.cue:22:52 783 734 // ./x.cue:44:29 784 - // ./x.cue:53:56 785 735 // ./x.cue:55:37 786 736 // ./x.cue:62:25 787 737 // ./x.cue:70:12 788 738 // ./x.cue:92:13 789 739 // ./x.cue:95:13 740 + // ./x.cue:95:18 790 741 // ./x.cue:109:13 791 742 // ./x.cue:112:3 792 743 // ./x.cue:118:4 ··· 806 757 // ./x.cue:62:25 807 758 // ./x.cue:70:12 808 759 // ./x.cue:70:47 809 - // ./x.cue:75:13 810 760 // ./x.cue:77:13 811 761 // ./x.cue:77:18 812 762 // ./x.cue:96:3 ··· 989 939 } 990 940 } 991 941 value0: (#struct){ 992 - @@ -304,1171 +327,127 @@ 942 + @@ -304,1165 +327,71 @@ 993 943 0: (string){ 994 944 "UseSectionName" 995 945 let INL#9 = (_|_){ ··· 1004 954 - // ./x.cue:111:13 1005 955 - // ./x.cue:123:9 1006 956 - // ./x.cue:124:16 1007 - + // [eval] value0.xs.0.INL: 2 errors in empty disjunction: 1008 - + // value0.xs.0.INL: 5 errors in empty disjunction: 1009 - + // value0.xs.0.INL: 6 errors in empty disjunction: 1010 - + // value0.xs.0.INL: conflicting values [...] and string (mismatched types list and string): 1011 - + // ./x.cue:22:51 1012 - + // ./x.cue:22:52 1013 - + // ./x.cue:28:12 1014 - + // ./x.cue:44:29 1015 - + // ./x.cue:51:14 1016 - + // ./x.cue:53:18 1017 - + // ./x.cue:55:19 1018 - + // ./x.cue:62:25 1019 - + // ./x.cue:70:12 1020 - + // ./x.cue:70:47 1021 - + // ./x.cue:109:13 1022 - + // ./x.cue:111:13 1023 - + // ./x.cue:111:18 1024 - + // ./x.cue:123:9 1025 - // value0.xs.0.INL: conflicting values [...] and {Append:#ConfigText} (mismatched types list and struct): 957 + - // value0.xs.0.INL: conflicting values [...] and {Append:#ConfigText} (mismatched types list and struct): 1026 958 - // ./x.cue:22:52 1027 959 - // ./x.cue:44:29 1028 960 - // ./x.cue:53:32 1029 961 - // ./x.cue:55:19 1030 962 - // ./x.cue:62:25 1031 963 - // ./x.cue:70:12 1032 - + // ./x.cue:22:51 1033 - + // ./x.cue:22:52 1034 - + // ./x.cue:28:12 1035 - + // ./x.cue:44:29 1036 - + // ./x.cue:53:32 1037 - + // ./x.cue:55:19 1038 - + // ./x.cue:62:25 1039 - + // ./x.cue:70:12 1040 - + // ./x.cue:70:47 1041 - // ./x.cue:109:13 1042 - // ./x.cue:111:13 1043 - // ./x.cue:111:18 1044 - // ./x.cue:123:9 1045 - // value0.xs.0.INL: conflicting values [...] and {Prepend:#ConfigText} (mismatched types list and struct): 964 + - // ./x.cue:109:13 965 + - // ./x.cue:111:13 966 + - // ./x.cue:111:18 967 + - // ./x.cue:123:9 968 + - // value0.xs.0.INL: conflicting values [...] and {Prepend:#ConfigText} (mismatched types list and struct): 1046 969 - // ./x.cue:22:52 1047 970 - // ./x.cue:44:29 1048 971 - // ./x.cue:53:56 1049 972 - // ./x.cue:55:19 1050 973 - // ./x.cue:62:25 1051 974 - // ./x.cue:70:12 1052 - + // ./x.cue:22:51 1053 - + // ./x.cue:22:52 1054 - + // ./x.cue:28:12 1055 - + // ./x.cue:44:29 1056 - + // ./x.cue:53:56 1057 - + // ./x.cue:55:19 1058 - + // ./x.cue:62:25 1059 - + // ./x.cue:70:12 1060 - + // ./x.cue:70:47 1061 - // ./x.cue:109:13 1062 - // ./x.cue:111:13 1063 - // ./x.cue:111:18 1064 - // ./x.cue:123:9 1065 - // value0.xs.0.INL: conflicting values [...] and {UseSectionName:true} (mismatched types list and struct): 975 + - // ./x.cue:109:13 976 + - // ./x.cue:111:13 977 + - // ./x.cue:111:18 978 + - // ./x.cue:123:9 979 + - // value0.xs.0.INL: conflicting values [...] and {UseSectionName:true} (mismatched types list and struct): 1066 980 - // ./x.cue:22:52 1067 981 - // ./x.cue:44:29 1068 982 - // ./x.cue:51:23 ··· 1163 1077 - UseSectionName: (bool){ true } 1164 1078 - }) } 1165 1079 - }) } 1080 + + // [eval] value0.xs.0.INL: conflicting values [...] and {UseSectionName:true} (mismatched types list and struct): 1166 1081 + // ./x.cue:22:51 1167 1082 + // ./x.cue:22:52 1168 - + // ./x.cue:28:12 1169 1083 + // ./x.cue:44:29 1170 - + // ./x.cue:51:23 1171 - + // ./x.cue:53:18 1172 - + // ./x.cue:55:19 1084 + + // ./x.cue:44:56 1173 1085 + // ./x.cue:62:25 1174 1086 + // ./x.cue:70:12 1175 1087 + // ./x.cue:70:47 1176 - + // ./x.cue:109:13 1177 1088 + // ./x.cue:111:13 1178 1089 + // ./x.cue:111:18 1179 1090 + // ./x.cue:123:9 1091 + + // ./x.cue:124:16 1180 1092 + UseSectionName: (_|_){ 1181 1093 + // [cycle] cycle error 1182 1094 + } ··· 1281 1193 - // value0.xs.0.INA: 9 errors in empty disjunction:: 1282 1194 - // ./x.cue:97:7 1283 1195 + // [eval] value0.xs.0.INA: 3 errors in empty disjunction: 1284 - + // value0.xs.0.INA: conflicting values {Prepend:#ConfigText} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 1196 + + // value0.xs.0.INA: conflicting values {Append:_} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 1285 1197 + // ./x.cue:22:51 1286 1198 + // ./x.cue:22:52 1287 1199 + // ./x.cue:44:29 1288 - + // ./x.cue:53:56 1289 1200 + // ./x.cue:55:37 1290 1201 + // ./x.cue:62:25 1291 1202 + // ./x.cue:70:12 1292 1203 + // ./x.cue:92:13 1293 1204 + // ./x.cue:94:13 1205 + + // ./x.cue:94:18 1294 1206 + // ./x.cue:109:13 1295 1207 + // ./x.cue:112:3 1296 1208 + // ./x.cue:118:4 ··· 1834 1746 - // ./x.cue:123:9 1835 1747 - // ./x.cue:124:16 1836 1748 + // [eval] value0.xs.0.INP: 2 errors in empty disjunction: 1837 - + // value0.xs.0.INP: conflicting values {Prepend:#ConfigText} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 1749 + + // value0.xs.0.INP: conflicting values {Prepend:_} and [#ConfigTextRule,#ConfigTextRule,...#ConfigTextRule] (mismatched types struct and list): 1838 1750 + // ./x.cue:22:51 1839 1751 + // ./x.cue:22:52 1840 1752 + // ./x.cue:44:29 1841 - + // ./x.cue:53:56 1842 1753 + // ./x.cue:55:37 1843 1754 + // ./x.cue:62:25 1844 1755 + // ./x.cue:70:12 1845 1756 + // ./x.cue:92:13 1846 1757 + // ./x.cue:95:13 1758 + + // ./x.cue:95:18 1847 1759 + // ./x.cue:109:13 1848 1760 + // ./x.cue:112:3 1849 1761 + // ./x.cue:118:4 ··· 2243 2155 } 2244 2156 let INS#5 = (_|_){ 2245 2157 // [eval] value0.xs.0.INS: conflicting values string and {UseSectionName:true} (mismatched types string and struct): 2246 - - // ./x.cue:22:52 2247 - - // ./x.cue:44:29 2248 - - // ./x.cue:44:56 2249 - - // ./x.cue:62:25 2250 - - // ./x.cue:70:12 2251 - - // ./x.cue:70:47 2252 2158 + // ./x.cue:22:51 2253 - + // ./x.cue:22:52 2254 - + // ./x.cue:44:29 2255 - + // ./x.cue:44:56 2256 - + // ./x.cue:62:25 2257 - + // ./x.cue:70:12 2258 - + // ./x.cue:70:47 2259 - + // ./x.cue:75:13 2260 - // ./x.cue:77:13 2261 - // ./x.cue:77:18 2262 - // ./x.cue:96:3 2263 - @@ -1479,7 +458,9 @@ 2159 + // ./x.cue:22:52 2160 + // ./x.cue:44:29 2161 + // ./x.cue:44:56 2162 + @@ -1479,7 +408,9 @@ 2264 2163 // ./x.cue:118:38 2265 2164 // ./x.cue:123:9 2266 2165 // ./x.cue:124:16
+127 -60
cue/testdata/eval/notify.txtar
··· 35 35 -- out/evalalpha -- 36 36 Errors: 37 37 t1.p1: 2 errors in empty disjunction: 38 - t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 38 + t1.p1: conflicting values {a,a:{a:(2|1)}} and 1 (mismatched types struct and int): 39 39 ./in.cue:1:9 40 40 ./in.cue:2:2 41 - ./in.cue:3:5 42 41 ./in.cue:3:10 43 - t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 42 + t1.p1: conflicting values {a,a:{a:(2|1)}} and 2 (mismatched types struct and int): 44 43 ./in.cue:1:9 45 44 ./in.cue:2:2 46 - ./in.cue:3:5 47 45 ./in.cue:3:8 48 46 t1.p2: 2 errors in empty disjunction: 49 - t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 47 + t1.p2: conflicting values {a:{a:(2|1)},a} and 1 (mismatched types struct and int): 50 48 ./in.cue:5:9 51 - ./in.cue:6:5 52 49 ./in.cue:6:10 53 50 ./in.cue:7:2 54 - t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 51 + t1.p2: conflicting values {a:{a:(2|1)},a} and 2 (mismatched types struct and int): 55 52 ./in.cue:5:9 56 - ./in.cue:6:5 57 53 ./in.cue:6:8 58 54 ./in.cue:7:2 59 55 t2.p1.d: 2 errors in empty disjunction: 60 - t2.p1.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 56 + t2.p1.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 61 57 ./in.cue:10:5 62 - ./in.cue:11:8 58 + ./in.cue:11:5 63 59 ./in.cue:11:13 64 - t2.p1.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 60 + t2.p1.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 65 61 ./in.cue:10:5 66 - ./in.cue:11:8 62 + ./in.cue:11:5 67 63 ./in.cue:11:11 68 64 t2.p2.d: 2 errors in empty disjunction: 69 - t2.p2.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 65 + t2.p2.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 70 66 ./in.cue:14:5 71 - ./in.cue:15:8 67 + ./in.cue:15:5 72 68 ./in.cue:15:13 73 - t2.p2.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 69 + t2.p2.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 74 70 ./in.cue:14:5 75 - ./in.cue:15:8 71 + ./in.cue:15:5 76 72 ./in.cue:15:11 77 73 78 74 Result: ··· 82 78 // [eval] 83 79 p1: (_|_){ 84 80 // [eval] t1.p1: 2 errors in empty disjunction: 85 - // t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 81 + // t1.p1: conflicting values {a,a:{a:(2|1)}} and 1 (mismatched types struct and int): 86 82 // ./in.cue:1:9 87 83 // ./in.cue:2:2 88 - // ./in.cue:3:5 89 84 // ./in.cue:3:10 90 - // t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 85 + // t1.p1: conflicting values {a,a:{a:(2|1)}} and 2 (mismatched types struct and int): 91 86 // ./in.cue:1:9 92 87 // ./in.cue:2:2 93 - // ./in.cue:3:5 94 88 // ./in.cue:3:8 95 89 a: (struct){ 96 90 a: (_){ _ } ··· 98 92 } 99 93 p2: (_|_){ 100 94 // [eval] t1.p2: 2 errors in empty disjunction: 101 - // t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 95 + // t1.p2: conflicting values {a:{a:(2|1)},a} and 1 (mismatched types struct and int): 102 96 // ./in.cue:5:9 103 - // ./in.cue:6:5 104 97 // ./in.cue:6:10 105 98 // ./in.cue:7:2 106 - // t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 99 + // t1.p2: conflicting values {a:{a:(2|1)},a} and 2 (mismatched types struct and int): 107 100 // ./in.cue:5:9 108 - // ./in.cue:6:5 109 101 // ./in.cue:6:8 110 102 // ./in.cue:7:2 111 103 a: (struct){ ··· 119 111 // [eval] 120 112 d: (_|_){ 121 113 // [eval] t2.p1.d: 2 errors in empty disjunction: 122 - // t2.p1.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 114 + // t2.p1.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 123 115 // ./in.cue:10:5 124 - // ./in.cue:11:8 116 + // ./in.cue:11:5 125 117 // ./in.cue:11:13 126 - // t2.p1.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 118 + // t2.p1.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 127 119 // ./in.cue:10:5 128 - // ./in.cue:11:8 120 + // ./in.cue:11:5 129 121 // ./in.cue:11:11 130 122 a: (struct){ 131 123 a: (_){ _ } ··· 136 128 // [eval] 137 129 d: (_|_){ 138 130 // [eval] t2.p2.d: 2 errors in empty disjunction: 139 - // t2.p2.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 131 + // t2.p2.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 140 132 // ./in.cue:14:5 141 - // ./in.cue:15:8 133 + // ./in.cue:15:5 142 134 // ./in.cue:15:13 143 - // t2.p2.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 135 + // t2.p2.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 144 136 // ./in.cue:14:5 145 - // ./in.cue:15:8 137 + // ./in.cue:15:5 146 138 // ./in.cue:15:11 147 139 a: (struct){ 148 140 a: (_){ _ } ··· 1147 1139 diff old new 1148 1140 --- old 1149 1141 +++ new 1150 - @@ -1,19 +1,23 @@ 1142 + @@ -1,39 +1,39 @@ 1151 1143 Errors: 1152 1144 t1.p1: 2 errors in empty disjunction: 1153 - t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1145 + -t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1146 + - ./in.cue:2:2 1147 + - ./in.cue:3:5 1148 + +t1.p1: conflicting values {a,a:{a:(2|1)}} and 1 (mismatched types struct and int): 1154 1149 + ./in.cue:1:9 1155 - ./in.cue:2:2 1156 - ./in.cue:3:5 1150 + + ./in.cue:2:2 1157 1151 ./in.cue:3:10 1158 - t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1152 + -t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1153 + - ./in.cue:2:2 1154 + - ./in.cue:3:5 1155 + +t1.p1: conflicting values {a,a:{a:(2|1)}} and 2 (mismatched types struct and int): 1159 1156 + ./in.cue:1:9 1160 - ./in.cue:2:2 1161 - ./in.cue:3:5 1157 + + ./in.cue:2:2 1162 1158 ./in.cue:3:8 1163 1159 t1.p2: 2 errors in empty disjunction: 1164 - t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1160 + -t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1161 + - ./in.cue:6:5 1162 + +t1.p2: conflicting values {a:{a:(2|1)},a} and 1 (mismatched types struct and int): 1165 1163 + ./in.cue:5:9 1166 - ./in.cue:6:5 1167 1164 ./in.cue:6:10 1168 1165 ./in.cue:7:2 1169 - t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1166 + -t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1167 + - ./in.cue:6:5 1168 + +t1.p2: conflicting values {a:{a:(2|1)},a} and 2 (mismatched types struct and int): 1170 1169 + ./in.cue:5:9 1171 - ./in.cue:6:5 1172 1170 ./in.cue:6:8 1173 1171 ./in.cue:7:2 1174 - @@ -44,29 +48,33 @@ 1172 + t2.p1.d: 2 errors in empty disjunction: 1173 + -t2.p1.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1174 + - ./in.cue:10:5 1175 + - ./in.cue:11:8 1176 + +t2.p1.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 1177 + + ./in.cue:10:5 1178 + + ./in.cue:11:5 1179 + ./in.cue:11:13 1180 + -t2.p1.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1181 + - ./in.cue:10:5 1182 + - ./in.cue:11:8 1183 + +t2.p1.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 1184 + + ./in.cue:10:5 1185 + + ./in.cue:11:5 1186 + ./in.cue:11:11 1187 + t2.p2.d: 2 errors in empty disjunction: 1188 + -t2.p2.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1189 + - ./in.cue:14:5 1190 + - ./in.cue:15:8 1191 + +t2.p2.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 1192 + + ./in.cue:14:5 1193 + + ./in.cue:15:5 1194 + ./in.cue:15:13 1195 + -t2.p2.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1196 + - ./in.cue:14:5 1197 + - ./in.cue:15:8 1198 + +t2.p2.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 1199 + + ./in.cue:14:5 1200 + + ./in.cue:15:5 1201 + ./in.cue:15:11 1202 + 1203 + Result: 1204 + @@ -43,30 +43,30 @@ 1205 + // [eval] 1175 1206 p1: (_|_){ 1176 1207 // [eval] t1.p1: 2 errors in empty disjunction: 1177 - // t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1208 + - // t1.p1: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1209 + - // ./in.cue:2:2 1210 + - // ./in.cue:3:5 1211 + + // t1.p1: conflicting values {a,a:{a:(2|1)}} and 1 (mismatched types struct and int): 1178 1212 + // ./in.cue:1:9 1179 - // ./in.cue:2:2 1180 - // ./in.cue:3:5 1213 + + // ./in.cue:2:2 1181 1214 // ./in.cue:3:10 1182 - // t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1215 + - // t1.p1: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1216 + - // ./in.cue:2:2 1217 + - // ./in.cue:3:5 1218 + + // t1.p1: conflicting values {a,a:{a:(2|1)}} and 2 (mismatched types struct and int): 1183 1219 + // ./in.cue:1:9 1184 - // ./in.cue:2:2 1185 - // ./in.cue:3:5 1220 + + // ./in.cue:2:2 1186 1221 // ./in.cue:3:8 1187 1222 a: (struct){ 1188 1223 - a: (int){ |((int){ 2 }, (int){ 1 }) } ··· 1191 1226 } 1192 1227 p2: (_|_){ 1193 1228 // [eval] t1.p2: 2 errors in empty disjunction: 1194 - // t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1229 + - // t1.p2: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1230 + - // ./in.cue:6:5 1231 + + // t1.p2: conflicting values {a:{a:(2|1)},a} and 1 (mismatched types struct and int): 1195 1232 + // ./in.cue:5:9 1196 - // ./in.cue:6:5 1197 1233 // ./in.cue:6:10 1198 1234 // ./in.cue:7:2 1199 - // t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1235 + - // t1.p2: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1236 + - // ./in.cue:6:5 1237 + + // t1.p2: conflicting values {a:{a:(2|1)},a} and 2 (mismatched types struct and int): 1200 1238 + // ./in.cue:5:9 1201 - // ./in.cue:6:5 1202 1239 // ./in.cue:6:8 1203 1240 // ./in.cue:7:2 1204 1241 a: (struct){ ··· 1207 1244 } 1208 1245 } 1209 1246 } 1210 - @@ -85,7 +93,7 @@ 1211 - // ./in.cue:11:8 1247 + @@ -76,16 +76,16 @@ 1248 + // [eval] 1249 + d: (_|_){ 1250 + // [eval] t2.p1.d: 2 errors in empty disjunction: 1251 + - // t2.p1.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1252 + - // ./in.cue:10:5 1253 + - // ./in.cue:11:8 1254 + + // t2.p1.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 1255 + + // ./in.cue:10:5 1256 + + // ./in.cue:11:5 1257 + // ./in.cue:11:13 1258 + - // t2.p1.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1259 + - // ./in.cue:10:5 1260 + - // ./in.cue:11:8 1261 + + // t2.p1.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 1262 + + // ./in.cue:10:5 1263 + + // ./in.cue:11:5 1212 1264 // ./in.cue:11:11 1213 1265 a: (struct){ 1214 1266 - a: (int){ |((int){ 2 }, (int){ 1 }) } ··· 1216 1268 } 1217 1269 } 1218 1270 } 1219 - @@ -102,7 +110,7 @@ 1220 - // ./in.cue:15:8 1271 + @@ -93,16 +93,16 @@ 1272 + // [eval] 1273 + d: (_|_){ 1274 + // [eval] t2.p2.d: 2 errors in empty disjunction: 1275 + - // t2.p2.d: conflicting values 1 and {a:(2|1)} (mismatched types int and struct): 1276 + - // ./in.cue:14:5 1277 + - // ./in.cue:15:8 1278 + + // t2.p2.d: conflicting values {a:{a:(2|1)}} and 1 (mismatched types struct and int): 1279 + + // ./in.cue:14:5 1280 + + // ./in.cue:15:5 1281 + // ./in.cue:15:13 1282 + - // t2.p2.d: conflicting values 2 and {a:(2|1)} (mismatched types int and struct): 1283 + - // ./in.cue:14:5 1284 + - // ./in.cue:15:8 1285 + + // t2.p2.d: conflicting values {a:{a:(2|1)}} and 2 (mismatched types struct and int): 1286 + + // ./in.cue:14:5 1287 + + // ./in.cue:15:5 1221 1288 // ./in.cue:15:11 1222 1289 a: (struct){ 1223 1290 - a: (int){ |((int){ 2 }, (int){ 1 }) } ··· 1225 1292 } 1226 1293 } 1227 1294 } 1228 - @@ -119,7 +127,7 @@ 1295 + @@ -119,7 +119,7 @@ 1229 1296 } 1230 1297 issue3437: (struct){ 1231 1298 r: (_|_){ ··· 1234 1301 // ./issue3437.cue:2:9 1235 1302 } 1236 1303 d: (struct){ 1237 - @@ -131,33 +139,853 @@ 1304 + @@ -131,33 +131,853 @@ 1238 1305 } 1239 1306 } 1240 1307 }
+12 -6
cue/testdata/fulleval/046_non-structural_direct_cycles.txtar
··· 27 27 Disjuncts: 8 28 28 -- out/evalalpha -- 29 29 Errors: 30 - c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 30 + c2: conflicting values {bar:1} and 1 (mismatched types struct and int): 31 31 ./in.cue:2:5 32 32 ./in.cue:2:16 33 33 ./in.cue:2:21 ··· 42 42 baz: (int){ 2 } 43 43 } 44 44 c2: (_|_){ 45 - // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 45 + // [eval] c2: conflicting values {bar:1} and 1 (mismatched types struct and int): 46 46 // ./in.cue:2:5 47 47 // ./in.cue:2:16 48 48 // ./in.cue:2:21 ··· 54 54 diff old new 55 55 --- old 56 56 +++ new 57 - @@ -2,6 +2,7 @@ 58 - c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 57 + @@ -1,7 +1,8 @@ 58 + Errors: 59 + -c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 60 + +c2: conflicting values {bar:1} and 1 (mismatched types struct and int): 59 61 ./in.cue:2:5 60 62 ./in.cue:2:16 61 63 + ./in.cue:2:21 62 64 63 65 Result: 64 66 (_|_){ 65 - @@ -16,6 +17,8 @@ 66 - // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 67 + @@ -13,9 +14,11 @@ 68 + baz: (int){ 2 } 69 + } 70 + c2: (_|_){ 71 + - // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct): 72 + + // [eval] c2: conflicting values {bar:1} and 1 (mismatched types struct and int): 67 73 // ./in.cue:2:5 68 74 // ./in.cue:2:16 69 75 - bar: (int){ 1 }
+3 -3
cuego/examples_test.go
··· 45 45 // completed: cuego_test.Sum{A:1, B:5, C:6} (err: <nil>) 46 46 // completed: cuego_test.Sum{A:2, B:6, C:8} (err: <nil>) 47 47 // 2 errors in empty disjunction: 48 - // conflicting values null and {A:2,B:3,C:8} (mismatched types null and struct) 48 + // conflicting values {A:2,B:3,C:8} and null (mismatched types struct and null) 49 49 // A: conflicting values 5 and 2 50 50 } 51 51 ··· 98 98 // error: nil 99 99 // validate: nil 100 100 // validate: 2 errors in empty disjunction: 101 - // conflicting values null and {Filename:"foo.json",MaxCount:12,MinCount:39} (mismatched types null and struct) 101 + // conflicting values {let jsonFile#1==~".json$",Filename:jsonFile,OptFile?:jsonFile,MinCount:(>0 & <=MaxCount),MaxCount:<=10000} and null (mismatched types struct and null) 102 102 // MinCount: invalid value 39 (out of bound <=12) 103 103 // validate: 2 errors in empty disjunction: 104 - // conflicting values null and {Filename:"foo.jso",MaxCount:120,MinCount:39} (mismatched types null and struct) 104 + // conflicting values {let jsonFile#1==~".json$",Filename:jsonFile,OptFile?:jsonFile,MinCount:(>0 & <=MaxCount),MaxCount:<=10000} and null (mismatched types struct and null) 105 105 // Filename: invalid value "foo.jso" (out of bound =~".json$") 106 106 } 107 107
+9 -18
encoding/gocode/gen_test.go
··· 48 48 name: "failing field with validator", 49 49 value: &pkg1.OtherStruct{A: "car"}, 50 50 want: `2 errors in empty disjunction: 51 - conflicting values null and {A:strings.ContainsAny("X"),P:"cuelang.org/go/encoding/gocode/testdata/pkg2".PickMe} (mismatched types null and struct): 52 - pkg1/instance.cue:x:x 51 + conflicting values {A:"car",P:0} and null (mismatched types struct and null) 53 52 A: invalid value "car" (does not satisfy strings.ContainsAny("X")): 54 53 pkg1/instance.cue:x:x 55 54 pkg1/instance.cue:x:x`, 56 55 }, { 57 56 name: "failing field of type int", 58 57 value: &pkg1.MyStruct{A: 11, B: "dog"}, 59 - want: ` 60 - 2 errors in empty disjunction: 61 - conflicting values null and {A:<=10,B:(=~"cat"|*"dog"),O?:OtherStruct,I:"cuelang.org/go/encoding/gocode/testdata/pkg2".ImportMe} (mismatched types null and struct): 62 - pkg1/instance.cue:x:x 58 + want: `2 errors in empty disjunction: 59 + conflicting values {A:11,B:"dog",T:"0001-01-01T00:00:00Z"} and null (mismatched types struct and null) 63 60 A: invalid value 11 (out of bound <=10): 64 61 pkg1/instance.cue:x:x`, 65 62 }, { 66 63 name: "failing nested struct ", 67 64 value: &pkg1.MyStruct{A: 5, B: "dog", O: &pkg1.OtherStruct{A: "car", P: 6}}, 68 65 want: `4 errors in empty disjunction: 69 - conflicting values null and {A:<=10,B:(=~"cat"|*"dog"),O?:OtherStruct,I:"cuelang.org/go/encoding/gocode/testdata/pkg2".ImportMe} (mismatched types null and struct): 70 - pkg1/instance.cue:x:x 66 + conflicting values {A:5,B:"dog",T:"0001-01-01T00:00:00Z",O:{A:"car",P:6}} and null (mismatched types struct and null) 71 67 O: 2 errors in empty disjunction: 72 - O: conflicting values null and {A:strings.ContainsAny("X"),P:"cuelang.org/go/encoding/gocode/testdata/pkg2".PickMe} (mismatched types null and struct): 73 - pkg1/instance.cue:x:x 68 + O: conflicting values {A:"car",P:6} and null (mismatched types struct and null): 74 69 pkg1/instance.cue:x:x 75 70 O.A: invalid value "car" (does not satisfy strings.ContainsAny("X")): 76 71 pkg1/instance.cue:x:x ··· 78 73 }, { 79 74 name: "fail nested struct of different package", 80 75 value: &pkg1.MyStruct{A: 5, B: "dog", O: &pkg1.OtherStruct{A: "X", P: 4}}, 81 - want: ` 82 - 4 errors in empty disjunction: 83 - conflicting values null and {A:<=10,B:(=~"cat"|*"dog"),O?:OtherStruct,I:"cuelang.org/go/encoding/gocode/testdata/pkg2".ImportMe} (mismatched types null and struct): 84 - pkg1/instance.cue:x:x 76 + want: `4 errors in empty disjunction: 77 + conflicting values {A:5,B:"dog",T:"0001-01-01T00:00:00Z",O:{A:"X",P:4}} and null (mismatched types struct and null) 85 78 O: 2 errors in empty disjunction: 86 - O: conflicting values null and {A:strings.ContainsAny("X"),P:"cuelang.org/go/encoding/gocode/testdata/pkg2".PickMe} (mismatched types null and struct): 87 - pkg1/instance.cue:x:x 79 + O: conflicting values {A:"X",P:4} and null (mismatched types struct and null): 88 80 pkg1/instance.cue:x:x 89 81 O.P: invalid value 4 (out of bound >5): 90 - pkg2/instance.cue:x:x 91 - `, 82 + pkg2/instance.cue:x:x`, 92 83 }, { 93 84 name: "all good", 94 85 value: &pkg1.MyStruct{
+1 -1
encoding/jsonschema/testdata/external/tests/draft2020-12/contains.json
··· 210 210 "valid": true, 211 211 "skip": { 212 212 "v3": "disallowed:\n generated.cue:5:58\n generated.cue:5:1\n instance.json:1:1\n", 213 - "v3-roundtrip": "conflicting values [\"foo\"] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [\"foo\"] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [\"foo\"] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [\"foo\"] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [\"foo\"] (mismatched types string and list):\n instance.json:1:1\ndisallowed\ninvalid value [\"foo\"] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 213 + "v3-roundtrip": "conflicting values bool and [\"foo\"] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [\"foo\"] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [\"foo\"] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [\"foo\"] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [\"foo\"] (mismatched types struct and list):\n instance.json:1:1\ndisallowed\ninvalid value [\"foo\"] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 214 214 } 215 215 }, 216 216 {
+6 -6
encoding/jsonschema/testdata/external/tests/draft2020-12/items.json
··· 462 462 "valid": true, 463 463 "skip": { 464 464 "v3": "7 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (0 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 465 - "v3-roundtrip": "conflicting values [] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nincompatible list lengths (0 and 4)\ninvalid value [] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 465 + "v3-roundtrip": "conflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (0 and 4)\ninvalid value [] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 466 466 } 467 467 }, 468 468 { ··· 473 473 "valid": true, 474 474 "skip": { 475 475 "v3": "7 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (1 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 476 - "v3-roundtrip": "conflicting values [1] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nincompatible list lengths (1 and 4)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 476 + "v3-roundtrip": "conflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (1 and 4)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 477 477 } 478 478 }, 479 479 { ··· 485 485 "valid": true, 486 486 "skip": { 487 487 "v3": "7 errors in empty disjunction:\nconflicting values [1,2] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1,2] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1,2] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1,2] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1,2] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (2 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 488 - "v3-roundtrip": "conflicting values [1,2] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [1,2] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2] (mismatched types string and list):\n instance.json:1:1\nincompatible list lengths (2 and 4)\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 488 + "v3-roundtrip": "conflicting values bool and [1,2] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1,2] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (2 and 4)\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 489 489 } 490 490 }, 491 491 { ··· 498 498 "valid": true, 499 499 "skip": { 500 500 "v3": "0: disallowed:\n generated.cue:3:54\n generated.cue:3:1\n instance.json:1:1\n", 501 - "v3-roundtrip": "conflicting values [1,2,3] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [1,2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2,3] (mismatched types string and list):\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 501 + "v3-roundtrip": "conflicting values bool and [1,2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2,3] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1,2,3] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 502 502 } 503 503 }, 504 504 { ··· 573 573 "valid": true, 574 574 "skip": { 575 575 "v3": "6 errors in empty disjunction:\nconflicting values \"x\" and int (mismatched types string and int):\n generated.cue:3:1\n generated.cue:3:53\n instance.json:1:2\nconflicting values [\"x\",2,3] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [\"x\",2,3] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [\"x\",2,3] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [\"x\",2,3] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [\"x\",2,3] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:60\n instance.json:1:1\n", 576 - "v3-roundtrip": "5 errors in empty disjunction:\nconflicting values \"x\" and int (mismatched types string and int):\n instance.json:1:2\nconflicting values [\"x\",2,3] and bool (mismatched types list and bool):\n instance.json:1:1\nconflicting values [\"x\",2,3] and null (mismatched types list and null):\n instance.json:1:1\nconflicting values [\"x\",2,3] and number (mismatched types list and number):\n instance.json:1:1\nconflicting values [\"x\",2,3] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [\"x\",2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [\"x\",2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [\"x\",2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [\"x\",2,3] (mismatched types string and list):\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 576 + "v3-roundtrip": "5 errors in empty disjunction:\nconflicting values \"x\" and int (mismatched types string and int):\n instance.json:1:2\nconflicting values [\"x\",2,3] and bool (mismatched types list and bool):\n instance.json:1:1\nconflicting values [\"x\",2,3] and null (mismatched types list and null):\n instance.json:1:1\nconflicting values [\"x\",2,3] and number (mismatched types list and number):\n instance.json:1:1\nconflicting values [\"x\",2,3] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [\"x\",2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [\"x\",2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [\"x\",2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [\"x\",2,3] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [\"x\",2,3] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 577 577 } 578 578 }, 579 579 { ··· 613 613 "valid": true, 614 614 "skip": { 615 615 "v3": "0: disallowed:\n generated.cue:3:48\n generated.cue:3:1\n instance.json:1:1\n", 616 - "v3-roundtrip": "conflicting values [null] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [null] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [null] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [null] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [null] (mismatched types string and list):\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 616 + "v3-roundtrip": "conflicting values bool and [null] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [null] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [null] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [null] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [null] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 617 617 } 618 618 } 619 619 ]
+1 -1
encoding/jsonschema/testdata/external/tests/draft2020-12/optional/id.json
··· 47 47 "data": "a string to match #/$defs/id_in_enum", 48 48 "valid": true, 49 49 "skip": { 50 - "v3-roundtrip": "conflicting values \"a string to match #/$defs/id_in_enum\" and {$id!:\"https://localhost:1234/draft2020-12/id/my_identifier.json\",type!:\"null\"} (mismatched types string and struct):\n instance.json:1:1\nconflicting values \"a string to match #/$defs/id_in_enum\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"a string to match #/$defs/id_in_enum\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 50 + "v3-roundtrip": "conflicting values \"a string to match #/$defs/id_in_enum\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"a string to match #/$defs/id_in_enum\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 51 51 } 52 52 }, 53 53 {
+1 -1
encoding/jsonschema/testdata/external/tests/draft2020-12/optional/unknownKeyword.json
··· 48 48 "data": "a string", 49 49 "valid": true, 50 50 "skip": { 51 - "v3-roundtrip": "conflicting values \"a string\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"a string\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\ncannot use \"a string\" (type _|_) as _ in argument 1 to matchN:\n instance.json:1:1\n" 51 + "v3-roundtrip": "conflicting values \"a string\" and {...} (mismatched types string and struct):\n instance.json:1:1\ninvalid value \"a string\" (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 52 52 } 53 53 }, 54 54 {
+2 -2
encoding/jsonschema/testdata/external/tests/draft2020-12/prefixItems.json
··· 37 37 "valid": true, 38 38 "skip": { 39 39 "v3": "6 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:54\n instance.json:1:1\nincompatible list lengths (1 and 3):\n generated.cue:3:33\n", 40 - "v3-roundtrip": "conflicting values [1] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nincompatible list lengths (1 and 3)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 40 + "v3-roundtrip": "conflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (1 and 3)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 41 41 } 42 42 }, 43 43 { ··· 55 55 "valid": true, 56 56 "skip": { 57 57 "v3": "6 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:54\n instance.json:1:1\nincompatible list lengths (0 and 3):\n generated.cue:3:33\n", 58 - "v3-roundtrip": "conflicting values [] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nincompatible list lengths (0 and 3)\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 58 + "v3-roundtrip": "conflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (0 and 3)\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 59 59 } 60 60 }, 61 61 {
+1 -1
encoding/jsonschema/testdata/external/tests/draft2020-12/ref.json
··· 858 858 "data": 5, 859 859 "valid": true, 860 860 "skip": { 861 - "v3-roundtrip": "conflicting values 5 and {...} (mismatched types int and struct):\n instance.json:1:1\ncannot use 5 (type _|_) as _ in argument 1 to matchN:\n instance.json:1:1\n" 861 + "v3-roundtrip": "conflicting values 5 and {...} (mismatched types int and struct):\n instance.json:1:1\n" 862 862 } 863 863 }, 864 864 {
+6 -6
encoding/jsonschema/testdata/external/tests/draft2020-12/uniqueItems.json
··· 508 508 "valid": true, 509 509 "skip": { 510 510 "v3": "0: disallowed:\n generated.cue:5:78\n generated.cue:5:1\n instance.json:1:1\n", 511 - "v3-roundtrip": "conflicting values [false,true] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 511 + "v3-roundtrip": "conflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 512 512 } 513 513 }, 514 514 { ··· 520 520 "valid": true, 521 521 "skip": { 522 522 "v3": "0: disallowed:\n generated.cue:5:78\n generated.cue:5:1\n instance.json:1:1\n", 523 - "v3-roundtrip": "conflicting values [true,false] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 523 + "v3-roundtrip": "conflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 524 524 } 525 525 }, 526 526 { ··· 845 845 "valid": true, 846 846 "skip": { 847 847 "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 848 - "v3-roundtrip": "conflicting values [false,true] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 848 + "v3-roundtrip": "conflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 849 849 } 850 850 }, 851 851 { ··· 857 857 "valid": true, 858 858 "skip": { 859 859 "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 860 - "v3-roundtrip": "conflicting values [true,false] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 860 + "v3-roundtrip": "conflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 861 861 } 862 862 }, 863 863 { ··· 869 869 "valid": true, 870 870 "skip": { 871 871 "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 872 - "v3-roundtrip": "conflicting values [false,false] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [false,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,false] (mismatched types string and list):\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 872 + "v3-roundtrip": "conflicting values bool and [false,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 873 873 } 874 874 }, 875 875 { ··· 881 881 "valid": true, 882 882 "skip": { 883 883 "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 884 - "v3-roundtrip": "conflicting values [true,true] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [true,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,true] (mismatched types string and list):\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 884 + "v3-roundtrip": "conflicting values bool and [true,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 885 885 } 886 886 }, 887 887 {
+4
internal/core/adt/conjunct.go
··· 233 233 if x.Label.IsString() && x.ArcType == ArcMember { 234 234 n.aStruct = s 235 235 n.aStructID = ci 236 + n.updateNodeType(StructKind, s, ci) 236 237 } 237 238 ci := n.ctx.subField(ci) 238 239 if x.ArcType == ArcOptional { ··· 261 262 if x.ArcType == ArcMember { 262 263 n.aStruct = s 263 264 n.aStructID = ci 265 + n.updateNodeType(StructKind, s, ci) 264 266 } 265 267 n.scheduleTask(handleDynamic, childEnv, x, ci) 266 268 ··· 285 287 if !hasEmbed { 286 288 n.aStruct = s 287 289 n.aStructID = ci 290 + n.updateNodeType(StructKind, s, ci) 288 291 } 289 292 } 290 293 ··· 464 467 if _, ok := x.BaseValue.(*StructMarker); ok { 465 468 n.aStruct = x 466 469 n.aStructID = id 470 + n.updateNodeType(StructKind, x, id) 467 471 } 468 472 469 473 if !x.IsData() {
+1 -18
internal/core/adt/disjunct2.go
··· 861 861 // TODO: this could be done much more cleanly if we are more deligent in early 862 862 // evaluation. 863 863 func isEqualNodeValue(x, y *nodeContext) bool { 864 - xk := x.kind 865 - yk := y.kind 866 - 867 - // If a node is mid evaluation, the kind might not be actual if the type is 868 - // a struct, as whether a struct is a struct kind or an embedded type is 869 - // determined later. This is just a limitation of the current 870 - // implementation, we should update the kind more directly so that this code 871 - // is not necessary. 872 - // TODO: verify that this is still necessary and if so fix it so that this 873 - // can be removed. 874 - if x.aStruct != nil { 875 - xk &= StructKind 876 - } 877 - if y.aStruct != nil { 878 - yk &= StructKind 879 - } 880 - 881 - if xk != yk { 864 + if x.kind != y.kind { 882 865 return false 883 866 } 884 867 if x.hasTop != y.hasTop {