Luau 0.743

0.743
Changed 4
  • table.find is faster, especially on small arrays and when the value being searched for has no __eq metamethod
  • Error messages are clearer when a read-only or write-only table is passed to a parameter that expects a read-write property
  • Locals no longer count toward the 200-local limit after their last use, even within the same block, so some code that previously failed with 'out of local registers' now compiles
  • At debug level 2, constant locals are no longer kept as extra locals and upvalues
Fixed 1
  • Type-only cyclic modules with a conditional early return are no longer handled incorrectly

From Luau

Happy spooky season! Leaves are falling 🍂 and so are bugs. The Luau team is raking them up with another release! 🍁

General 🎃
  • table.find is faster, especially on small arrays and when the value you're looking for has no __eq metamethod
Analysis 🍁
  • Clearer error messages when a read-only or write-only table is passed to a parameter that expects a read-write property.

This mostly comes up with frozen tables:

local function setX(t: { x: number })
      t.x = 5
end

local frozen = table.freeze({ x = 1 })
-- Before: "Expected this to be '{ x: number }', but got '{ x: number }'"
-- After: the error says `x` is a read-only property, but the parameter needs read-write setX(frozen)
Compiler 🌰
  • Locals no longer count toward the 200-local limit after their last use, even within the same block. Some code that used to fail with "out of local registers" now compiles:
local a, b, c = ...
local d = a * b + c

local e = ... -- if a/b/c are no longer used below, 'e' can take their slot
  • At debug level 2, constant locals are no longer kept as extra locals and upvalues.
  • Fixes type-only cyclic modules with a conditional early return being handled incorrectly

Many thanks to our contributors!

Co-authored-by: Andy Friesen afriesen@roblox.com Co-authored-by: Annie Tang annietang@roblox.com Co-authored-by: Ariel Weiss arielweiss@roblox.com Co-authored-by: Hunter Goldstein hgoldstein@roblox.com Co-authored-by: Ilya Rezvov irezvov@roblox.com Co-authored-by: Sora Kanosue skanosue@roblox.com Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com Co-authored-by: Varun Saini vsaini@roblox.com Co-authored-by: Vighnesh Vijay vvijay@roblox.com Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

Full Changelog: https://github.com/luau-lang/luau/compare/0.742...0.743

View original

Upgraded? How did it go?

Discussion