Skip to content

0.734

Choose a tag to compare

@github-actions github-actions released this 14 Aug 17:52
Immutable release. Only release title and notes can be modified.
3fc82b1

Made a wish on a shooting star this week? 🌠 The Luau team's here to make them come true with another release! 🌌

General 🌟

  • pcall and xpcall are now allowed in user-defined type functions! Resolving #2499 and in accordance to luau-lang/rfcs#228

Analysis ⭐️

  • Improvements to quality of error messages, resolving #2611 and #2612
  • Fixes an issue where the new solver would not infer generalized iteration:
local function setupRootMappingMove(rootMapping)
    -- Prior, the new solver would infer `rootMapping.RootToDescendantCountMap`
    -- as `unknown`, which is clearly not correct.
    for root, childCount in rootMapping.RootToDescendantCountMap do
           string.len(root)
           math.abs(childCount)
    end
end
  • Fixes a refinement bug that could cause us to report any as the result of indexing into a refined table that contained a blocked type:
const MyClass = {
    __index = {},
}

type MyClass<T> = setmetatable<{ _t: T }, typeof(MyClass)>

type MyFunction<T> = (class: MyClass<T>) -> () | {
    fn: ((class: MyClass<T>) -> ())?,
}

function MyClass.__index.call<T>(self: MyClass<T>, f: MyFunction<T>): ()
    if type(f) == "function" then
        f(self)
    elseif f.fn then 
        -- Prior, we would infer this to be `any`, which is incorrect.
        const thevalue = f.fn
        local _ = thevalue
        f.fn(self)
    end
end
  • Wrap only function return types in AstTypeGroup for unions and intersections, so
    (string) -> ((string) & (number) -> (number)) is improved to (string) -> (string) & (number) -> (number)
  • Fixes a bug in the New Type Solver that reports an incorrect error on the wrong argument for function calls
  • Fix negated integer literals reporting a type error by @green-real in #2615

Runtime ✨

  • Fix missing links in luaC_enumheap
  • Luau CodeGen: flow known tag info in and through fallback blocks

And thanks to our contributors as always!

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: Phil Pizlo fpizlo@roblox.com
Co-authored-by: Sora Kanosue skanosue@roblox.com
Co-authored-by: Thomas Schollenberger tschollenberger@roblox.com
Co-authored-by: Vighnesh Vijay vvijay@roblox.com
Co-authored-by: Vyacheslav Egorov vegorov@roblox.com

Full Changelog: 0.733...0.734