Commit aec5a8c
Pin #712 null-value semantics for
A `null` map value has no protobuf encoding, so it writes as a key-only entry;
read back, such an entry yields `null` rather than the empty message protobuf
would consider it. An entry must produce some value token -- unlike a plain
message field, which simply stays absent -- and the choice round-trips, but
nothing pinned it, so either direction could be flipped unnoticed.
Two tests: the message-valued case (both directions, plus the contrast with an
empty value message, which does write `12 00`), and the scalar case, whose read
direction `testAbsentKeyAndValueDefaults` already covers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>map entries1 parent 80f28c3 commit aec5a8c
1 file changed
Lines changed: 50 additions & 0 deletions
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
340 | 390 | | |
341 | 391 | | |
342 | 392 | | |
| |||
0 commit comments