Commit 9f5eee1
committed
Select a matching deprecated alternative in anyOf/oneOf
A deprecation notice is advisory, not a validation failure, but
hasProblems() counted it like any other problem. So a deprecated branch
of an anyOf/oneOf that actually matched the value was treated as a
non-match, and a non-matching sibling was reported instead (e.g. a
const branch's 'Value is not accepted' message). The const case
happened to work only because enumValueMatch is a separate tiebreaker;
a pattern branch had no such luck.
Exclude deprecation problems from hasProblems() so match selection
ignores them. The deprecation diagnostic is still reported.
Fixes #3041 parent 257468d commit 9f5eee1
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2633 | 2633 | | |
2634 | 2634 | | |
2635 | 2635 | | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
2636 | 2667 | | |
2637 | 2668 | | |
2638 | 2669 | | |
| |||
0 commit comments