Skip to content

fix(compiler): fold builtin calls on the authored literal (#373) - #377

Merged
Teakowa merged 1 commit into
mainfrom
feat/373-fold-authored
Sep 25, 2026
Merged

Teakowa merged 1 commit into
mainfrom
feat/373-fold-authored

Conversation

@e54-bot

@e54-bot e54-bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #373

Argument coercions are now applied after operator folding, so builtin folds see the literal the author wrote, as the pinned OverPy 9.7.10 does.

  • Coerced arguments record their authored literal; optimized value calls fold on it, and calls that remain get the canonical form back.
  • An authored [] keeps its spelling in action arguments (no longer read as an empty string, so hudText(..., [], ...) stays Empty Array).
  • A Null .replace replacement is wrapped in Update Every Frame, as the reference does.
  • Adds oracle-backed fixture structural-authored-literals; removes the fold-after-coercion probe gap.

Verification: workspace tests (incl. the 12 semantic-equivalence tests), clippy, fmt, tools/overpy unit tests, and the full builtin probe (3786 probes, 0 unexplained).

Argument coercions are applied after operator folding instead of before it, so folds see what the author wrote. An authored empty array keeps its spelling in action arguments, and a Null String Replace replacement is wrapped as the reference does. Removes the fold-after-coercion probe gap.

Fixes #373

@Teakowa Teakowa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teakowa
Teakowa merged commit 47cee14 into main Sep 25, 2026
5 checks passed
@Teakowa
Teakowa deleted the feat/373-fold-authored branch September 25, 2026 12:23
This was referenced Sep 25, 2026
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.

Fold builtin calls on the authored literal, not the coerced one

2 participants