luau/tests/conformance
vegorov-rbx 55f3e00938
Sync to upstream/release/687 (#1954)
## What's Changed?

This week we have an update with an implementation for one of the RFCs
we had approved before, an improvement of the new type solver and a
small Lua 5.1 C API compatibility improvement.

* `@deprecated` attribute can now have a custom suggestion for a
replacement and a reason message as described in [deprecated attribute
parameters
RFC](https://rfcs.luau.org/syntax-attribute-functions-deprecated.html)

For example:
```luau
@[deprecated {reason = "foo suffers from performance issues", use = "bar"}]
local function foo()
    ...
end

-- Function 'foo' is deprecated, use 'bar' instead. foo suffers from performance issues
foo()
```

* `lua_cpcall` C API function has been restored both for compatibility
with Lua 5.1 and as a safe way to enter protected call environment to
work with Luau C API functions that may error

Instead of
```
if (!lua_checkstack(L, 2))
    return -1;
lua_pushcfunction(L, test, nullptr);
lua_pushlightuserdata(L, context);
int status = lua_pcall(L, 1, 0, 0);
```
you can simply do 
```
int status = lua_cpcall(L, test, context);
```

* In Luau CLI, required module return values can now have any type

## New Type Solver
- Additional improvements on type refinements used with external types
should fix some reported false positive errors where types refined to
`never`
- Fixed an issue in recursive refinement types in a form of `t1 where t1
= refine<t1, _>` getting 'stuck'
- Fixed an issue in subtyping of generic functions, it is now possible
to assign `<T>(T, (T) -> T) -> T` to `(number, <X>(X) -> X) -> number`
- Fixed an ICE caused by recursive types (Fixes #1686)
- Added additional iteration and recursion limits to stop the type
solver before system resources are used up

## Internal Contributors

Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Annie Tang <annietang@roblox.com>
Co-authored-by: Ariel Weiss <aaronweiss@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: Vighnesh Vijay <vvijay@roblox.com>
Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
2025-08-15 11:48:43 -07:00
..
apicalls.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
assert.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
attrib.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
basic.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
bitwise.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
buffers.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
calls.luau Sync to upstream/release/684 (#1930) 2025-07-25 15:33:42 -07:00
clear.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
closure.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
constructs.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
coroutine.luau Sync to upstream/release/684 (#1930) 2025-07-25 15:33:42 -07:00
coverage.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
cyield.luau Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
datetime.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
debug.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
debugger.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
errors.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
events.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
exceptions.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
gc.luau Sync to upstream/release/677 (#1872) 2025-06-06 11:52:47 -07:00
ifelseexpr.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
interrupt.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
iter.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
literals.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
locals.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
math.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
move.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
native.luau Sync to upstream/release/687 (#1954) 2025-08-15 11:48:43 -07:00
native_types.luau Sync to upstream/release/687 (#1954) 2025-08-15 11:48:43 -07:00
native_userdata.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
ndebug_upvalues.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
pcall.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
pm.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
safeenv.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
sort.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
strconv.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
stringinterp.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
strings.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
tables.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
tmerror.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
tpack.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
types.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
userdata.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
utf8.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
vararg.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00
vector.luau Sync to upstream/release/687 (#1954) 2025-08-15 11:48:43 -07:00
vector_library.luau chore: update applicable .lua files to .luau (#1560) 2025-02-21 14:29:20 -08:00