Yeah, unluac doesn't support this case. It should be easy to add it. I might make it an option flag because I think there are ambiguous cases (vararg, no params, 1 upvalue is the environment table for 5.2 plus). There's no canonical way to output it, but I guess I'll probably make an outer chunk that returns an anonymous function and declares any necessary upvalues.
Also run tests in Lua 5.4.8
Heuristic to avoid backward jump as 'always loop' if it introduces more needed gotos
Refinements of if/goto handling for 5.4.3+ (Lua changeset ab1aca94e83d2eff1605ea1854df023c814cef21)
There were some other related issues. Should be fixed with the newer version (2025_10_20) With the Lua 5.4.8 compiler, some of the goto tests also failed, seems like an unrelated issue, but I haven't tried to look for the compiler change yet. Maybe not such an impediment to decompilation (doesn't crash, and is maybe equivalent code, just not round-trip-identical).
version string
Fix remaining variable scope issues from 5.4.5+
Some refactoring of close/scope handling / fix repeat break target with jmp-style close