fix(encode): reject a nil MarshalTOML result

Assisted-by: GLM 5.3
This commit is contained in:
2026-09-17 23:11:10 +02:00
parent d5327568fb
commit 4def1b3e8b
4 changed files with 61 additions and 2 deletions
+4
View File
@@ -45,6 +45,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- A `MarshalTOML` result of `nil` with a nil error fails the marshal with
`MarshalTOML returned a nil value`. The field silently vanished before, and
inside a value array the nil result reached reflection as a zero value and
panicked.
- Decoding into a struct that embeds a pointer to itself terminates. The
schema walk recursed through the embedded type forever, so such a
`Unmarshal` call hung the process; the walk now tracks the struct types on