Repository navigation
Commit 680d19f
fix(v4): report a union option that only checks rejected (#6662)
Since #6652 an oversized array, set or map fails its size bound before
its elements are parsed, and the issue aborts so nothing reads the
unparsed value. A union treated that abort like a type mismatch and fell
back to invalid_union, where 4.6.5 reported the option's too_big.
When no option can continue, the union now falls back to the options
whose issues all came from checks, and reports that option if it is the
only one.
Fixes #6659
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 40a5dba commit 680d19f
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2466 | 2466 | | |
2467 | 2467 | | |
2468 | 2468 | | |
2469 | | - | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
2473 | 2477 | | |
2474 | 2478 | | |
2475 | 2479 | | |
| |||
0 commit comments