luau/Ast/src
menarulalam 8fe64db609
Sync to upstream/release/679 (#1884)
# What's Changed?

We've been hard at work fixing bugs and introducing new features!

## VM 
* Include constant-folding information in Luau cost model for inlining
and loop unrolling
   * ~1% improvement in compile times

## New Type Solver
* `Luau::shallowClone`'s last argument, whether to clone persistent
(builtin) types, is now non-optional.
* Refinements on properties of tables are now computed with a `read`
table property. This resolves some issues around refining table
properies and then trying to set them. Fixes #1344. Fixes #1651.
```
if foo.bar then
    -- Prior to this release, this would be `typeof(foo) & { bar: ~(false?) }
    -- Now, this is `typeof(foo) & { read bar: ~(false?) }
end
```
* The type function `keyof` should respect the empty string as a
property, as in:
```
-- equivalent to type Foo =""
type Foo = keyof<{ [""]: number }>
```
* Descend into literals to report subtyping errors for function calls:
this both improves bidirectional inference and makes errors more
specific. Before, the error reporting for a table with incorrect members
passed to a function would cite the entire table, but now it only cites
the members that are incorrectly typed.
* Fixes a case where intersecting two tables without any common
properties would create `never`, instead of a table with both of their
properties.

# Internal Contributors
Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com>
Co-authored-by: James McNellis <jmcnellis@roblox.com>
Co-authored-by: Sora Kanosue <skanosue@roblox.com>
Co-authored-by: Talha Pathan <tpathan@roblox.com>
Co-authored-by: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>

---------

Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com>
Co-authored-by: Varun Saini <61795485+vrn-sn@users.noreply.github.com>
Co-authored-by: Alexander Youngblood <ayoungblood@roblox.com>
Co-authored-by: Aviral Goel <agoel@roblox.com>
Co-authored-by: Vighnesh <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
Co-authored-by: Andy Friesen <afriesen@roblox.com>
2025-06-20 15:55:42 -07:00
..
Allocator.cpp Sync to upstream/release/656 (#1612) 2025-01-10 11:34:39 -08:00
Ast.cpp Sync to upstream/release/679 (#1884) 2025-06-20 15:55:42 -07:00
Confusables.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Cst.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Lexer.cpp Sync to upstream/release/666 (#1747) 2025-03-21 14:43:00 -07:00
Location.cpp Sync to upstream/release/656 (#1612) 2025-01-10 11:34:39 -08:00
Parser.cpp Sync to upstream/release/679 (#1884) 2025-06-20 15:55:42 -07:00
StringUtils.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
TimeTrace.cpp Sync to upstream/release/650 (#1502) 2024-11-01 12:06:07 -07:00