Skip to content

Add official lua tests and fix compatibility issues - #248

Merged
levno-710 merged 20 commits into
masterfrom
feature/official-lua-tests
Oct 27, 2026
Merged

levno-710 merged 20 commits into
masterfrom
feature/official-lua-tests

Conversation

@levno-710

Copy link
Copy Markdown
Member

Adds the official Lua 5.1 tests alongside the existing Lua and Luau cases. The runner isolates each case, supports selecting cases, presets, runtimes, and seeds, and saves failure logs and generated scripts for reproduction.

The tests exposed several compatibility issues. This PR fixes:

  • Lost nil arguments and return values, including forwarding through functions, methods, and the outer chunk wrapper.
  • Parenthesized calls and varargs incorrectly expanding into multiple values.
  • Method lookup happening after argument evaluation.
  • Incorrect dependencies when compiling nested function declarations.
  • Numeric loops failing to coerce valid string inputs or preserve their initial values, limits, and steps.
  • Generic loops discarding additional iterator results.
  • Indexed assignments losing their original table or key when later expressions changed local variables.
  • Function environments set before a call being ignored, including environment inheritance by nested functions.
  • Dead VM registers retaining objects and preventing garbage collection.
  • Merged assignments exceeding Lua’s temporary register budget.
  • VM dispatch selecting the wrong block for consecutive IDs or overwriting dispatch entries when IDs overlapped list indices.
  • Number serialization and mutation changing non-finite values or overflowing hexadecimal representations.

Adds regression checks for these fixes and documents compatibility limitations, including legacy implicit arg variables and replacing a function’s environment while it is running.

@levno-710 levno-710 changed the title ADD OFFICIAL LUA TESTS AND FIX COMPATIBILITY ISSUES Add official lua tests and fix compatibility issues Oct 27, 2026
@levno-710
levno-710 merged commit f087361 into master Oct 27, 2026
1 check passed
@levno-710
levno-710 deleted the feature/official-lua-tests branch October 27, 2026 12:45
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