Skip to content

fix: support negative list and array indexes - #91

Merged
muhammadyusufpov merged 4 commits into
hyperlangg:mainfrom
Rayan-and-beyond:fix/negative-indexes-74
Sep 15, 2026
Merged

muhammadyusufpov merged 4 commits into
hyperlangg:mainfrom
Rayan-and-beyond:fix/negative-indexes-74

Conversation

@Rayan-and-beyond

Copy link
Copy Markdown
Contributor

Summary

  • support Python-style negative indexes for list/array get and set in the C runtime
  • keep the Rust reference runtime in sync with the same normalization rule
  • preserve the existing miss/no-op behavior for indexes that are still out of range
  • add a focused fixture and CI check against explicit expected output for both hyper run and hyper compile

Validation

  • cargo test --quiet — 85 passed
  • default LLVM hyper run / hyper compile fixture output matches the expected output
  • Cranelift hyper run / hyper compile fixture output matches the expected output
  • existing ci/collections/collections_compile.hyp smoke passes
  • git diff --check

Fixes #74

@muhammadyusufpov
muhammadyusufpov merged commit 539882b into hyperlangg:main Sep 15, 2026
3 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.

Negative list and array indexes

2 participants