Skip to content

fix: report list.sum integer overflow - #118

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/list-sum-overflow
Open

fix: report list.sum integer overflow#118
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/list-sum-overflow

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Use checked addition for integer list.sum evaluation so overflow returns a Jett runtime error instead of panicking in the host interpreter.
  • Add a runtime-failure fixture covering the overflow boundary.

Verification

  • cargo fmt --all -- --check — passed.
  • cargo check -q — passed.
  • cargo build -q — passed.
  • cargo test -q -p jett_driver list_sum_reports_overflow -- --nocapture — passed.
  • cargo test -q -p jett_driver run_pass_list_higher_order -- --nocapture — passed.
  • cargo test -q — passed (full workspace, including 433 driver fixtures).
  • git diff --check — passed.

Risk

  • Low: the change only replaces an integer-overflow panic with the existing runtime-error path; successful sums and mixed-type handling are unchanged.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

vycdev commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The checked list.sum accumulation is correct in isolation and its regressions passed, but this branch now conflicts with current main in the shared interpreter/fixture area. Please rebase, preserve all already-merged runtime-failure tests, and rerun comptime/driver tests.

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.

2 participants