`examples/178-any-to-string-optional.sx` prints a struct whose three fields are `?s64` / `?string` / `?bool`, in both Some and None form. The struct-print path goes through `field_value(s, i) -> Any` and then `any_to_string(Any)`. Today: `any_to_string` has no `case optional:` arm and `resolveTypeCategoryTags` has no "optional" category — every optional field falls through to the `<?>` default. Expected output captures the working post-fix form (`a: 42`, `b: hi`, `c: true` for Some; `null` across the board for None). The next commit adds `optional_to_string` + `case optional:` to std and "optional" to `resolveTypeCategoryTags`. Variadic auto-unwrap (`packVariadicCallArgs`) keeps printing direct `print(opt)` calls correctly today; this fix closes the gap for struct fields, slice elements, and anywhere else an optional flows through Any.
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
0
|