2026.05.17¶
~literalizer.Dnow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable. A D literal binding wraps the right-hand side to encode the parsed value’s runtime type (aJSONValue(...)projection, or a positionalRecord0(...)struct-constructor literal under theRECORDstrategy), which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly asauto my_data = make_widget(...);. No caller-supplied return-type hint is required: D infers the binding type from the initializer. Because the binding is anautodeclaration while the~literalizer.ExistingVariableform is a bare assignment to an already-declared name, only the~literalizer.NewVariableform is golden-covered. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2511.~literalizer.SystemVerilognow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable. A SystemVerilog literal binding wraps the right-hand side in a named_VValstruct 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 asstatic _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_VValstruct, 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 insideinitial begin, where afunctiondeclaration is illegal. Because the binding is a typed declaration while the~literalizer.Zignow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~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 taggedZValunion projection, or a generatedRecord0struct literal under theRECORDstrategy) and declares an explicitZValvalue 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 Zigconst/vartype inference supplies the binding’s type. Because the binding is a keyword declaration while the~literalizer.ExistingVariableform is a bare assignment to an already-declared name, only the~literalizer.NewVariableform is golden-covered. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2510.~literalizer.Adanow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable. An Ada literal binding wraps the right-hand side in theA_Valconstructor 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 asmy_data : A_Val := Make_Widget (...);. No caller-supplied return-type hint is required: every generated Ada call stub returnsA_Val, so the binding’s declared type is alwaysA_Val(the same type an Ada literal binding declares). Because the binding is a typed declaration while the~literalizer.ExistingVariableform is a bare assignment to an already-declared name, only the~literalizer.NewVariableform is golden-covered. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2509.~literalizer.Fortrannow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable. A Fortran literal binding wraps the right-hand side in thefval_tconstructor 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 astype(fval_t) :: my_datafollowed bymy_data = make_widget(...). No caller-supplied return-type hint is required: every generated Fortran call stub returnstype(fval_t), so the binding’s declared type is alwaystype(fval_t)(the same type a Fortran literal binding declares). The call stub is emitted in the program’scontainssection, after the binding, so a value-returning call no longer needs an inline procedure body. Because the~literalizer.NewVariablebinding is a typed declaration while the~literalizer.ExistingVariableform is a bare assignment to an already-declared name, only the~literalizer.NewVariableform is golden-covered. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2507. #2508.~literalizer.Cnow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~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 astruct Record0 my_data = (struct Record0){...};aggregate under theRECORDstrategy), which is wrong for a call whose return type is opaque to the renderer; the call result is now bound directly asCVal my_data = make_widget(...);. No caller-supplied return-type hint is required: every generated call stub returns the universal taggedCValunion, so the binding’s declared type is alwaysCVal(the same type a C literal binding declares). Because the binding is a typed declaration while the~literalizer.ExistingVariableform is a bare assignment to an already-declared name, only the~literalizer.NewVariableform is golden-covered. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2506.~literalizer.Elixirnow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable. The call stub is emitted at module scope and the binding lives inside the generateddef x doentry function, somy_data = make_widget(42)no longer needs adefnested inside anotherdef. Because Elixir rebinds names with=, the~literalizer.ExistingVariableoutput is identical to the~literalizer.NewVariableoutput. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Follow-up to #1961. See #2226.~literalizer.Pythonnow emitsfrom __future__ import annotationsonly when the rendered code contains an annotation. An annotation comes from aRECORD-strategy@dataclasses.dataclassblock or an inline variable type hint (an empty-collection helper hint, or any declaration undervariable_type_hints=ALWAYS). Call-only output and annotation-free literals no longer carry the unused future import. See #2495.~literalizer.Forthnow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~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-executesmake_widgeton every invocation, and (because Forth has no reassignment in this model) the~literalizer.ExistingVariableoutput is identical to the~literalizer.NewVariableoutput; Forth’sVALUE/TOidiom was rejected because it holds only a single cell and cannot represent the string/dict/sequence values the colon form already covers. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding output is unchanged. Follow-up to #1961. See #2456.~literalizer.Nimnow acceptsvariable_formon~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. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding and call-without-binding output is unchanged. Only the~literalizer.NewVariableform emits a golden because the~literalizer.ExistingVariablebare assignment (my_data = make_widget(42)) to an undeclared name is not self-contained. Follow-up to #1961. See #2455.~literalizer.Ziggains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). The default (ERROR) strategy keeps the homogeneousZValtagged-union model; underRECORDeach record-shaped dict (non-empty, string-keyed) becomes a generatedconst RecordN = struct { ... };declared in the preamble plus a matchingRecord0{ .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 Tslices,struct { ... }tuples for heterogeneous lists, nestedRecordN). Without theZValunion the whole value is raw, so a non-record collection is a&.{ ... }slice /.{ ... }tuple and the binding drops its: ZValannotation; the class-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter and itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. See #2477.Fixed the
~literalizer.ZigRECORDfield 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 i64that inferring from the first element alone produced. See #2488.~literalizer.Odingains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated package-scopestructdeclared in the preamble plus a matchingRecord0{ field = value, ... }literal, so a record-shaped dict that mixes scalars with a container is representable even thoughmap[string]Vrequires homogeneous values. Field names are the dict keys verbatim, and the class-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter; itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. A list or ordered-map record field keeps Odin’s standard[dynamic]any{...}/map[string]any{...}rendering and is typed as the matchinganycontainer (no element type is inferred), and an integer field beyond the signed 64-bit range is typedu64to match its literal. The default (ERROR)map[string]anyoutput is unchanged. See #2481.~literalizer.StubReturnis now part of the public API. It was already the parameter type of the public~literalizer.Languageprotocol’sformat_call_stubandformat_call_preamble_stubmethods, so it is now re-exported from the package root for consumers implementing that protocol. See #1947.~literalizer.Dgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). The default (ERROR) strategy keeps the homogeneousstd.json.JSONValuemodel; underRECORDeach record-shaped dict (non-empty, string-keyed) becomes a generatedstruct RecordN { ... }declared in the preamble plus a matching positionalRecord0(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, nestedRecordN). Without theJSONValuewrapper the whole value is raw and the binding drops itsJSONValue; the class-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter and itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. 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.Crystalgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Cppand~literalizer.Python). Each record-shaped dict (non-empty, string-keyed) becomes a generatedrecordstruct declared in the per-fixture module body plus a matching positionalRecord0.new(value, ...)literal, so a record-shaped dict that mixes scalars with a container is representable even thoughHashrequires 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-suffixedInt128), and the struct-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter; itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. The default (ERROR) strategy still raises for such a dict. See #2420.~literalizer.Cppgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Javaand~literalizer.Python). Each record-shaped dict (non-empty, string-keyed) becomes a generated aggregatestructdeclared in the preamble plus a matchingRecord0{.field = value, ...}C++20 designated-initializer literal, so a record-shaped dict that mixes scalars with a container is representable even thoughstd::maprequires 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 newrecord_struct_name_prefixconstructor parameter; itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. A list whose every element is a record-shaped dict is opened withstd::vector{so class-template argument deduction infersstd::vector<RecordN>. The default (ERROR)std::variantoutput is unchanged. See #2420.~literalizer.CSharpgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated positionalrecorddeclared in the preamble plus a matchingnew Record0(value, ...)literal, so a record-shaped dict that mixes scalars with a container is representable even thoughDictionaryrequires a homogeneous value type. Component names are the PascalCase form of the dict keys; auto names areRecord0,Record1, …sequence_formatis forced toARRAYunder 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 arraynew[] { ... }so C# infersRecordN[]. The default (ERROR)Dictionaryoutput is unchanged. See #2475.~literalizer.Swiftgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generatedstructdeclared in the preamble plus a matchingRecord0(field: value, ...)initializer literal, so a record-shaped dict that mixes scalars with a container is representable as a typed value even thoughDictionaryrequires 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 newrecord_struct_name_prefixconstructor parameter; itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. The default (ERROR)Anyoutput is unchanged. See #2474.~literalizer.Cgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Python,~literalizer.Cppand~literalizer.Swift). Each record-shaped dict (non-empty, string-keyed) becomes a generated aggregatestructdeclared 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 taggedCValunion. Field names are the dict keys verbatim and each generatedstructis auto-namedRecord0,Record1, … A scalar member maps to its exact C type, a nested record dict to its generatedstructtype, and a list whose every element is a record-shaped dict to a fixed-sizestructarray member. Every other container (a scalar or heterogeneous list, or an empty list) is typed a pointer toCValand rendered as aCValarray literal, reusing C’s existing tagged union for arbitrary heterogeneity. Because that fixed-sizestructarray 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.UnrepresentableInputErrorrather 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)CValoutput is unchanged. See #2476.~literalizer.Vgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Pythonand~literalizer.Cpp). Each record-shaped dict (non-empty, string-keyed) becomes a generated file-scopestructdeclared in the preamble plus a matchingRecord0{ field: value, ... }literal, so a record-shaped dict that mixes scalars with a container is representable even though amaprequires 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 itsi64(...)/u64(...)cast, a nested record by its generated name, a list of record-shaped dicts as[]RecordN,Noneasvoidptr, an empty list as[]IVal), and the struct-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter; itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. AnEPOCHdatetime is now routed through the integer formatter so a post-2038 value keeps thei64(...)cast V requires. The default (ERROR) andINTERFACEoutputs are unchanged. See #2480.~literalizer.Nimgains theRECORDheterogeneous_strategy(already on~literalizer.Rust,~literalizer.Go,~literalizer.Kotlin,~literalizer.Scala,~literalizer.Java,~literalizer.Python,~literalizer.Cpp,~literalizer.Swift,~literalizer.Dand~literalizer.V). Each record-shaped dict (non-empty, string-keyed) becomes a generated module-scopetype Record0 = objectdeclaration plus a matchingRecord0(field: value, ...)literal, so a record-shaped dict that mixes scalars with a container is representable even though a NimTablerequires a homogeneous value type. Field names are the dict keys incamelCaseand a list field is element-typed (seq[int],seq[RecordN]); the class-name prefix is configurable via the newrecord_struct_name_prefixconstructor parameter, so itssupports_record_struct_name_prefixlanguage-class flag is nowTrue. Collections render with their native Nim constructors (@[...],{...}.toTable) as underOBJECT_VARIANT, but no scalar is wrapped and nojson/%*is emitted. A null field is the Nimpointertype; a set, ordered-map or non-record-dict field, and aNIM-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.ObjectiveCnow acceptsvariable_formon~literalizer.literalize_call, emittingid my_data = make_widget(@42);directly. The literal-binding declaration boxes a primitive right-hand side via@(...)because anidis a pointer type, but a call expression already yields an object pointer, so the boxing is dropped for the call-result binding. Itssupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding output is unchanged. See #2223.~literalizer.Erlangnow acceptsvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~literalizer.ExistingVariable, binding the call result withMy_data = make_widget(...). Awrap_in_file=TrueErlang scaffold hoists the generated call stub to module scope between-exportandx()(previously the literal-binding scaffold nested it inside thex/0clause, producing invalid Erlang) while keeping the binding and the trailingMy_data.return insidex(). See #2454.~literalizer.Tcland~literalizer.Bashnow acceptvariable_formon~literalizer.literalize_callfor both~literalizer.NewVariableand~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 emitsset my_data [make_widget 42]and Bash emitsdeclare my_data="$(make_widget 42)"(a baremy_data="$(...)"for an~literalizer.ExistingVariable). Theirsupports_call_variable_bindinglanguage-class flag is nowTrue; existing literal-binding output is unchanged. Follow-up to #1961. See #2222.