Skip to content

Preserve overloaded arithmetic result lifetime during ++ and -- - #1902

Merged
fglock merged 1 commit into
masterfrom
fix/date-simple-increment-format
Oct 27, 2026
Merged

fglock merged 1 commit into
masterfrom
fix/date-simple-increment-format

Conversation

@fglock

@fglock fglock commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Closes #1901

Summary

  • Route overloaded ++ and -- arithmetic fallback results through reference-counted scalar assignment.
  • Add a regression test covering preincrement, predecrement, postincrement, and postdecrement referent state.
  • Record the compatibility fix in the work-in-progress changelog.

Validation

  • nice -n 19 make — passed on the rebased commit.
  • make check-links — passed.
  • The regression test passed with system Perl, the JVM backend, and the interpreter backend.
  • Date-Simple 3.03 t/bug31037.t passed on both PerlOnJava backends with the archived CPAN load order.

Use reference-counted scalar assignment for overloaded increment and decrement fallbacks. Add a regression test for pre/post operations preserving referent state.

Refs #1901

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock
fglock marked this pull request as ready for review October 27, 2026 14:19
@fglock
fglock merged commit d9ac142 into master Oct 27, 2026
2 checks passed
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.

Preserve overloaded arithmetic result lifetime during ++ and --

1 participant