Skip to content

feat(phase-14a): Stubs, bitwise fixes, and math return types#140

Merged
davydog187 merged 1 commit intomainfrom
phase-14a-stubs-bitwise
Feb 12, 2026
Merged

feat(phase-14a): Stubs, bitwise fixes, and math return types#140
davydog187 merged 1 commit intomainfrom
phase-14a-stubs-bitwise

Conversation

@davydog187
Copy link
Contributor

Summary

  • collectgarbage stub accepting all standard modes with plausible return values
  • dofile stub raising "not supported in embedded mode"
  • _VERSION global set to "Lua 5.3"
  • Global unpack alias for table.unpack
  • Bitwise string coercion (e.g., "0xff" | 0)
  • Lua 5.3 shift semantics: negative shift reverses direction, shift >= 64 yields 0
  • Bitwise metamethods: __band, __bor, __bxor, __bnot, __shl, __shr
  • math.floor/math.ceil return integers instead of floats

Test plan

  • collectgarbage returns without error (2 tests)
  • _VERSION == "Lua 5.3" (1 test)
  • unpack({10, 20, 30}) works as global alias (1 test)
  • Bitwise string coercion and shift edge cases (3 tests)
  • math.floor/ceil return integers (2 tests)
  • Updated math_test.exs assertions for integer return types
  • 1224 tests, 0 failures, 35 skipped

🤖 Generated with Claude Code

- collectgarbage stub accepting all standard modes
- dofile stub raising "not supported in embedded mode"
- _VERSION global set to "Lua 5.3"
- Global unpack alias for table.unpack
- Bitwise string coercion (e.g., "0xff" | 0)
- Lua 5.3 shift semantics: negative reverses direction, >=64 yields 0
- Bitwise metamethods: __band, __bor, __bxor, __bnot, __shl, __shr
- math.floor/math.ceil return integers instead of floats

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davydog187 davydog187 force-pushed the phase-14a-stubs-bitwise branch from 6c2bb3c to 01e4cff Compare February 12, 2026 21:19
@davydog187 davydog187 merged commit 17e2359 into main Feb 12, 2026
2 checks passed
@davydog187 davydog187 deleted the phase-14a-stubs-bitwise branch February 12, 2026 21:42
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