2026.05.17

  • ~literalizer.D now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. A D literal binding wraps the right-hand side to encode the parsed value’s runtime type (a JSONValue(...) projection, or a positional Record0(...) struct-constructor literal under the RECORD strategy), which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly as auto my_data = make_widget(...);. No caller-supplied return-type hint is required: D infers the binding type from the initializer. Because the binding is an auto declaration while the ~literalizer.ExistingVariable form is a bare assignment to an already-declared name, only the ~literalizer.NewVariable form is golden-covered. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2511.

  • ~literalizer.SystemVerilog now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. A SystemVerilog literal binding wraps the right-hand side in a named _VVal struct literal derived from the parsed value’s runtime type, which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly as static _VVal my_data = make_widget(...);. SystemVerilog declarations are typed and have no inference, so the binding needs an explicit declared type; no caller-supplied return-type hint is required because every generated value-returning call stub returns the universal tagged _VVal struct, so the binding’s declared type is always _VVal (the same type a SystemVerilog scalar literal binding declares). The call stub is emitted at module scope rather than inside initial begin, where a function declaration is illegal. Because the binding is a typed declaration while the

  • ~literalizer.Zig now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. A Zig literal binding wraps the right-hand side in a designated-initializer struct literal that encodes the value’s runtime type (a tagged ZVal union projection, or a generated Record0 struct literal under the RECORD strategy) and declares an explicit ZVal value type, which is wrong for a call whose return type is opaque to the renderer; the call result is now bound with a plain inferred declaration, const my_data = make_widget(...);. No caller-supplied return-type hint is required: the Zig const/var type inference supplies the binding’s type. Because the binding is a keyword declaration while the ~literalizer.ExistingVariable form is a bare assignment to an already-declared name, only the ~literalizer.NewVariable form is golden-covered. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2510.

  • ~literalizer.Ada now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. An Ada literal binding wraps the right-hand side in the A_Val constructor chosen from the parsed literal’s runtime type, which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly as my_data : A_Val := Make_Widget (...);. No caller-supplied return-type hint is required: every generated Ada call stub returns A_Val, so the binding’s declared type is always A_Val (the same type an Ada literal binding declares). Because the binding is a typed declaration while the ~literalizer.ExistingVariable form is a bare assignment to an already-declared name, only the ~literalizer.NewVariable form is golden-covered. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2509.

  • ~literalizer.Fortran now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. A Fortran literal binding wraps the right-hand side in the fval_t constructor matching the parsed literal’s type (the integer, real, or string constructor), which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly as type(fval_t) :: my_data followed by my_data = make_widget(...). No caller-supplied return-type hint is required: every generated Fortran call stub returns type(fval_t), so the binding’s declared type is always type(fval_t) (the same type a Fortran literal binding declares). The call stub is emitted in the program’s contains section, after the binding, so a value-returning call no longer needs an inline procedure body. Because the ~literalizer.NewVariable binding is a typed declaration while the ~literalizer.ExistingVariable form is a bare assignment to an already-declared name, only the ~literalizer.NewVariable form is golden-covered. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2507. #2508.

  • ~literalizer.C now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. A C literal binding wraps the right-hand side in a designated-initializer compound literal that encodes the value’s runtime type (a tagged-union projection, or a struct Record0 my_data = (struct Record0){...}; aggregate under the RECORD strategy), which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly as CVal my_data = make_widget(...);. No caller-supplied return-type hint is required: every generated call stub returns the universal tagged CVal union, so the binding’s declared type is always CVal (the same type a C literal binding declares). Because the binding is a typed declaration while the ~literalizer.ExistingVariable form is a bare assignment to an already-declared name, only the ~literalizer.NewVariable form is golden-covered. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2506.

  • ~literalizer.Elixir now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. The call stub is emitted at module scope and the binding lives inside the generated def x do entry function, so my_data = make_widget(42) no longer needs a def nested inside another def. Because Elixir rebinds names with =, the ~literalizer.ExistingVariable output is identical to the ~literalizer.NewVariable output. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2226.

  • ~literalizer.Python now emits from __future__ import annotations only when the rendered code contains an annotation. An annotation comes from a RECORD-strategy @dataclasses.dataclass block or an inline variable type hint (an empty-collection helper hint, or any declaration under variable_type_hints=ALWAYS). Call-only output and annotation-free literals no longer carry the unused future import. See #2495.

  • ~literalizer.Forth now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable, binding the call result with the same colon definition Forth already uses for literal bindings: : my_data 42 make_widget ;. This is a deferred word that re-executes make_widget on every invocation, and (because Forth has no reassignment in this model) the ~literalizer.ExistingVariable output is identical to the ~literalizer.NewVariable output; Forth’s VALUE/TO idiom was rejected because it holds only a single cell and cannot represent the string/dict/sequence values the colon form already covers. Its supports_call_variable_binding language-class flag is now True; existing literal-binding output is unchanged. Follow-up to #1961. See #2456.

  • ~literalizer.Nim now accepts variable_form on ~literalizer.literalize_call, binding the call result directly: var my_data = make_widget(42). The literal-binding declaration template prefixes the right-hand side with the %* json macro (or @ for sequences) chosen from the parsed literal’s type, which JSON-constructs a literal rather than invoking a call; the new call-specific declaration and assignment templates drop that wrapping regardless of the source data type. Its supports_call_variable_binding language-class flag is now True; existing literal-binding and call-without-binding output is unchanged. Only the ~literalizer.NewVariable form emits a golden because the ~literalizer.ExistingVariable bare assignment (my_data = make_widget(42)) to an undeclared name is not self-contained. Follow-up to #1961. See #2455.

  • ~literalizer.Zig gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). The default (ERROR) strategy keeps the homogeneous ZVal tagged-union model; under RECORD each record-shaped dict (non-empty, string-keyed) becomes a generated const RecordN = struct { ... }; declared in the preamble plus a matching Record0{ .field = value, ... } literal whose fields are raw Zig values, so a record-shaped dict that mixes scalars with a container is representable. Field names are the dict keys verbatim and field types are inferred structurally from the value (i64/u64, f64, bool, []const u8, ?i64, []const T slices, struct { ... } tuples for heterogeneous lists, nested RecordN). Without the ZVal union the whole value is raw, so a non-record collection is a &.{ ... } slice / .{ ... } tuple and the binding drops its : ZVal annotation; the class-name prefix is configurable via the new record_struct_name_prefix constructor parameter and its supports_record_struct_name_prefix language-class flag is now True. See #2477.

  • Fixed the ~literalizer.Zig RECORD field type of an integer-list record field whose first element is small but a later element exceeds the signed 64-bit range: it is now []const u64 (typed from the widest element) instead of the []const i64 that inferring from the first element alone produced. See #2488.

  • ~literalizer.Odin gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated package-scope struct declared in the preamble plus a matching Record0{ field = value, ... } literal, so a record-shaped dict that mixes scalars with a container is representable even though map[string]V requires homogeneous values. Field names are the dict keys verbatim, and the class-name prefix is configurable via the new record_struct_name_prefix constructor parameter; its supports_record_struct_name_prefix language-class flag is now True. A list or ordered-map record field keeps Odin’s standard [dynamic]any{...} / map[string]any{...} rendering and is typed as the matching any container (no element type is inferred), and an integer field beyond the signed 64-bit range is typed u64 to match its literal. The default (ERROR) map[string]any output is unchanged. See #2481.

  • ~literalizer.StubReturn is now part of the public API. It was already the parameter type of the public ~literalizer.Language protocol’s format_call_stub and format_call_preamble_stub methods, so it is now re-exported from the package root for consumers implementing that protocol. See #1947.

  • ~literalizer.D gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). The default (ERROR) strategy keeps the homogeneous std.json.JSONValue model; under RECORD each record-shaped dict (non-empty, string-keyed) becomes a generated struct RecordN { ... } declared in the preamble plus a matching positional Record0(value, ...) constructor literal whose fields are raw D values, so a record-shaped dict that mixes scalars with a container is representable. Field names are the dict keys verbatim and field types are inferred structurally from the value (long/ ulong, double, bool, string, typeof(null), T[] arrays, nested RecordN). Without the JSONValue wrapper the whole value is raw and the binding drops its JSONValue; the class-name prefix is configurable via the new record_struct_name_prefix constructor parameter and its supports_record_struct_name_prefix language-class flag is now True. A heterogeneous scalar list, a set, an ordered map or a non-record dict has no raw D representation and raises ~literalizer.exceptions.UnrepresentableInputError (the cross-language decision for these is tracked in #2317). See #2478.

  • ~literalizer.Crystal gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Cpp and ~literalizer.Python). Each record-shaped dict (non-empty, string-keyed) becomes a generated record struct declared in the per-fixture module body plus a matching positional Record0.new(value, ...) literal, so a record-shaped dict that mixes scalars with a container is representable even though Hash requires a homogeneous value type. Field names are the dict keys verbatim, an integer field is sized to match its rendered literal (Int32 / Int64 / the _i128-suffixed Int128), and the struct-name prefix is configurable via the new record_struct_name_prefix constructor parameter; its supports_record_struct_name_prefix language-class flag is now True. The default (ERROR) strategy still raises for such a dict. See #2420.

  • ~literalizer.Cpp gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java and ~literalizer.Python). Each record-shaped dict (non-empty, string-keyed) becomes a generated aggregate struct declared in the preamble plus a matching Record0{.field = value, ...} C++20 designated-initializer literal, so a record-shaped dict that mixes scalars with a container is representable even though std::map requires homogeneous values. Field names are the dict keys verbatim, scalar members carry a {} in-class initializer (so the aggregate satisfies clang-tidy’s member-init check), and the class-name prefix is configurable via the new record_struct_name_prefix constructor parameter; its supports_record_struct_name_prefix language-class flag is now True. A list whose every element is a record-shaped dict is opened with std::vector{ so class-template argument deduction infers std::vector<RecordN>. The default (ERROR) std::variant output is unchanged. See #2420.

  • ~literalizer.CSharp gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated positional record declared in the preamble plus a matching new Record0(value, ...) literal, so a record-shaped dict that mixes scalars with a container is representable even though Dictionary requires a homogeneous value type. Component names are the PascalCase form of the dict keys; auto names are Record0, Record1, … sequence_format is forced to ARRAY under this strategy so a list-valued component has a typed array form, and a list whose every element is a record-shaped dict is opened with an implicitly-typed array new[] { ... } so C# infers RecordN[]. The default (ERROR) Dictionary output is unchanged. See #2475.

  • ~literalizer.Swift gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated struct declared in the preamble plus a matching Record0(field: value, ...) initializer literal, so a record-shaped dict that mixes scalars with a container is representable as a typed value even though Dictionary requires a homogeneous value type. Field names are the dict keys verbatim, a field whose value is a list of record-shaped dicts of one shape is typed [RecordN], and the struct-name prefix is configurable via the new record_struct_name_prefix constructor parameter; its supports_record_struct_name_prefix language-class flag is now True. The default (ERROR) Any output is unchanged. See #2474.

  • ~literalizer.C gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python, ~literalizer.Cpp and ~literalizer.Swift). Each record-shaped dict (non-empty, string-keyed) becomes a generated aggregate struct declared in the preamble plus a matching (struct Record0){.field = value, ...} C99 designated-initializer compound literal, so a record-shaped dict that mixes scalars with a container is rendered with cleanly typed members rather than the tagged CVal union. Field names are the dict keys verbatim and each generated struct is auto-named Record0, Record1, … A scalar member maps to its exact C type, a nested record dict to its generated struct type, and a list whose every element is a record-shaped dict to a fixed-size struct array member. Every other container (a scalar or heterogeneous list, or an empty list) is typed a pointer to CVal and rendered as a CVal array literal, reusing C’s existing tagged union for arbitrary heterogeneity. Because that fixed-size struct array is sized from the shape’s first-seen instance, two same-shape records whose shared all-record-list field has differing lengths are rejected with ~literalizer.exceptions.UnrepresentableInputError rather than emitting C that fails to compile or misrepresents the input (cf. the set / non-record-dict field boundary tracked in #2317). The default (ERROR) CVal output is unchanged. See #2476.

  • ~literalizer.V gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python and ~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated file-scope struct declared in the preamble plus a matching Record0{ field: value, ... } literal, so a record-shaped dict that mixes scalars with a container is representable even though a map requires a homogeneous value type. Field names are the dict keys verbatim; a field is typed from its value (an integer by its own magnitude so a wide value keeps its i64(...) / u64(...) cast, a nested record by its generated name, a list of record-shaped dicts as []RecordN, None as voidptr, an empty list as []IVal), and the struct-name prefix is configurable via the new record_struct_name_prefix constructor parameter; its supports_record_struct_name_prefix language-class flag is now True. An EPOCH datetime is now routed through the integer formatter so a post-2038 value keeps the i64(...) cast V requires. The default (ERROR) and INTERFACE outputs are unchanged. See #2480.

  • ~literalizer.Nim gains the RECORD heterogeneous_strategy (already on ~literalizer.Rust, ~literalizer.Go, ~literalizer.Kotlin, ~literalizer.Scala, ~literalizer.Java, ~literalizer.Python, ~literalizer.Cpp, ~literalizer.Swift, ~literalizer.D and ~literalizer.V). Each record-shaped dict (non-empty, string-keyed) becomes a generated module-scope type Record0 = object declaration plus a matching Record0(field: value, ...) literal, so a record-shaped dict that mixes scalars with a container is representable even though a Nim Table requires a homogeneous value type. Field names are the dict keys in camelCase and a list field is element-typed (seq[int], seq[RecordN]); the class-name prefix is configurable via the new record_struct_name_prefix constructor parameter, so its supports_record_struct_name_prefix language-class flag is now True. Collections render with their native Nim constructors (@[...], {...}.toTable) as under OBJECT_VARIANT, but no scalar is wrapped and no json/%* is emitted. A null field is the Nim pointer type; a set, ordered-map or non-record-dict field, and a NIM-table-literal date/datetime field, are rejected as out of scope for the base port (consistent with the other non-Rust ports; see #2317). The default (ERROR) JSON output is unchanged. See #2479.

  • ~literalizer.ObjectiveC now accepts variable_form on ~literalizer.literalize_call, emitting id my_data = make_widget(@42); directly. The literal-binding declaration boxes a primitive right-hand side via @(...) because an id is a pointer type, but a call expression already yields an object pointer, so the boxing is dropped for the call-result binding. Its supports_call_variable_binding language-class flag is now True; existing literal-binding output is unchanged. See #2223.

  • ~literalizer.Erlang now accepts variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable, binding the call result with My_data = make_widget(...). A wrap_in_file=True Erlang scaffold hoists the generated call stub to module scope between -export and x() (previously the literal-binding scaffold nested it inside the x/0 clause, producing invalid Erlang) while keeping the binding and the trailing My_data. return inside x(). See #2454.

  • ~literalizer.Tcl and ~literalizer.Bash now accept variable_form on ~literalizer.literalize_call for both ~literalizer.NewVariable and ~literalizer.ExistingVariable. Their literal-binding templates treat the right-hand side as a value word, so a call result is now bound through command substitution instead: Tcl emits set my_data [make_widget 42] and Bash emits declare my_data="$(make_widget 42)" (a bare my_data="$(...)" for an ~literalizer.ExistingVariable). Their supports_call_variable_binding language-class flag is now True; existing literal-binding output is unchanged. Follow-up to #1961. See #2222.