Commit 7386e90
tests: assert the json2 payload decoder, not a helper name, in skip-unused test
`test_skip_unused_keeps_json2_embedded_struct_decode_helpers` hard-coded the
generated symbol `x__json2__create_value_from_optional_T_time__Time`. That helper
is a json2 implementation detail removed by this PR (the option payload is now
built inline with `$zero(field.typ.payload_type)`), after which the symbol no
longer exists and the test would fail.
Assert `x__json2__Decoder_decode_value_T_time__Time` instead -- the generic
instantiation that actually decodes the `?time.Time` payload of the embedded
`Meta` struct, reachable only through comptime `$for field` codegen. It is the
symbol skip-unused must keep (the point of issue #26928), is present whether or
not the json2 helpers exist, and so the test no longer breaks when they are
refactored.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0880487 commit 7386e90
1 file changed
Lines changed: 5 additions & 1 deletion
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| |||
0 commit comments