Skip to content

Preserve wide integer literals across Ny and Matrix - #2

Merged
bytetroll merged 1 commit into
masterfrom
codex/integer-literal-widths
Oct 18, 2026
Merged

bytetroll merged 1 commit into
masterfrom
codex/integer-literal-widths

Conversation

@bytetroll

@bytetroll bytetroll commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Large integer literals previously inferred i32, so values could narrow before an i64 call or assignment. This also made nil.std.core.abs_i64(0) panic while allowing signed-minimum overflow to return unchanged.

Infer decimal integers by representable range, join mixed i32/i64 array elements consistently, and reject unsupported integer words before output generation in Ny and Matrix. Signed minima and negative match arms are supported, with regression coverage for subtraction in patterns, guards, and nested matches. Existing 32-bit hexadecimal masks and explicit narrowing retain their behavior. NIL-0007 and F30 document the contract and the remaining contextual-typing/Matrix-default decisions.

Validation:

  • All 428 repository tests passed with no skips in a clean-commit SDK build.
  • The integer contract includes 888 rejection/analysis checks and 12 executions with --no-typecheck; a separate unit test exercises code generation without the checker.
  • Paired Ny/Matrix fixtures cover interpreter, bundles, JIT/AOT, and standalone assembler/linker pipelines, including abs_i64 overflow rejection.
  • Installed SDK: all 752 executions passed across 47 fixtures, source/binary libraries, and eight execution paths. The SDK was built from clean commit 05414dd.

@bytetroll
bytetroll merged commit 05414dd into master Oct 18, 2026
6 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.

1 participant