Skip to content

0.729

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Jul 20:03
Immutable release. Only release title and notes can be modified.
6e9b580

General

Parser

Analysis

  • Fixed inference of higher order generic functions when, themselves, used with generic functions:
local function identity<T>(t: T)
    return t
end
-- Prior, `result` is of type `T?` and we error on `42` claiming its not of type `T`.
-- Now there are no errors and `result` is of type `number?`
local ok, result = pcall(identity, 42)
  • Fixed a class of internal compiler errors that could occur when nesting type-state-ing functions:
local tbl = {}
-- In some cases we would throw an exception like "CG: AstExprLocal came before its declaration?"
setmetatable(tbl, setmetatable(tbl, {}))
  • Indexing into refinements against any should now preserve the any-ness of the original value:
-- Prior the first two return statements would raise a type
-- checking error, as we'd claim they were `~nil`, dropping
-- the `*error-type*` part.
local function keyExtractor(item: any, index: number): string
    if typeof(item) == "table" and item.key ~= nil then
        return item.key
    end
    if typeof(item) == "table" and item.id ~= nil then
        return item.id
    end
    return tostring(index)
end

Runtime

  • Fixed a garbage collection issue with lua_registeruserdatadirectfieldget, where depending on the GC phase, we may erroneously consider an allocated dispatch table to be unreachable.
  • NCG: When replacing an instruction, we now more consistently attempt to substitute it with a precomputed value. E.g., if we replace an IR instruction with one that has already been computed, we can potentially emit a STORE rather than said instruction and an additional STORE.

New Contributors


Co-authored-by: Andy Friesen afriesen@roblox.com
Co-authored-by: Annie Tang annietang@roblox.com
Co-authored-by: Hunter Goldstein hgoldstein@roblox.com
Co-authored-by: Ilya Rezvov irezvov@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: 0.728...0.729