Skip to content

changed: an edit inside a multi-line const initializer is that const's - #1839

Merged
swapnilpaliwal-sd merged 2 commits into
apps/integration-0.1.9from
apps/typescript/multiline-const-initializer-change-attri
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
apps/integration-0.1.9from
apps/typescript/multiline-const-initializer-change-attri

Conversation

@swapnilpaliwal-sd

@swapnilpaliwal-sd swapnilpaliwal-sd commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor
  • An edit, inserted member, removed line or comment on a later line of a const/field whose initializer spans lines (a schema builder's object, an `as const` token table, a multi-line static initializer) was `body ` / `inside `, so test-impact seeded from the whole module. It is now `field X — initializer changed`.
  • A data key of a const object (now a declaration) edited in place was `type 3, → 4,`, and on a one-line const `LIMIT.max renamed → LIMIT`. It is now the key's `initializer changed`; a removed key is `removed`.
  • A method or lambda written inside the initializer keeps its own body; a Python module-level name is measured by its statement.
  • Cases: typescript/multi-line-initializer (8 checks incl. 3 controls: one-line const, object-literal method, function below), plus one check each for JS, Python, Java, C#. Without the fix, 6 of the 8 TS checks fail.
  • Checked: case suites TS 233/233, JS 286/286, Python 290/290, Java 330/330, C# 208/208. On a 74-probe TS monorepo: 52/74 pass (the loop's baseline engine: 47), no regressions; a one-property edit to each of three multi-line consts now names the const.

swapnilpaliwal-sd and others added 2 commits September 30, 2026 14:03
… field

An edit, insertion or comment on a later line of a const or field whose initializer
spans several lines was reported as a body change of the module (or 'inside' the
type), so test-impact seeded from the whole module. It is now the field's
'initializer changed'. A callable written inside the initializer keeps its own body;
a Python module-level name is measured by its statement, not its first-to-last
binding span.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
… lambda keeps its body

Since data keys of const objects are declarations, an edit to a key's value was read
as a typed field: 'type 3, → 4,', and on a one-line const 'LIMIT.max renamed → LIMIT'.
It is now the key's 'initializer changed'. A lambda on a later line of a multi-line
initializer is its own body again, as a method written there already was.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 96085c5 into apps/integration-0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the apps/typescript/multiline-const-initializer-change-attri branch September 30, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant