2026.05.17.1¶
~literalizer.CSharparray sequence-format no longer emitsusing System;orusing System.Collections.Generic;. A C# array literal (new T[] {...}) is a built-in language feature and requires nousingdirectives, so those lines were dead noise on the array path (for example aDictionarywhose values are arrays picked up a spurioususing System;).using System.Collections.Generic;is still emitted for the collection types that need it (List<T>,Dictionary<TKey, TValue>, and the set types), andusing System;forSystemscalar types such asDateOnly. The array empty form is now the typed literalnew T[] {}rather thanArray.Empty<T>(), keeping the array path free of anySystemreference. See #2524.~literalizer.literalize_callnow accepts abound_refsargument, the call-side counterpart of~literalizer.literalize’s ownbound_refs. Withwrap_in_file=Trueit renders a complete, self-contained file: each ref is declared (cased viaref_case) ahead of the calls, a no-op stub for the target function is injected, and one reconciled preamble (header and body) is placed in front, so callers no longer hand-roll a duplicate-removal pass. Entries double asref_valuesand are emitted in iteration order. Recomputing the body preamble across the union of types and reconciling the data-dependent header block into a single copy covering every type replaces the previous multi-line preamble-filter heuristic. The same single-copy reconciliation now also backs~literalizer.literalize’s ownbound_refsdeclaration composition, removing the last preamble-filter heuristic there with no change to generated output. See #1946.The
supports_call_variable_bindinglanguage-class flag has been removed. Every language now binds a~literalizer.literalize_callresult directly with no literal-only wrapping, so the flag wasTruefor all languages and its~literalizer.exceptions.UnsupportedCallShapeErrorrejection path was unreachable. No generated output changes. See #2521.