luau/Analysis/src
ayoungbloodrbx 92b0338400
Sync to upstream/release/676 (#1856)
We're back on track after the long weekend!

## General 
- `clang-format`ed new code. Keep your code tidy!
- Disable some Luau tests that are broken currently.
- Enable fragment autocomplete to do tagged union completion for modules
typechecked in the old solver.

## New Type Solver
- Fix false positives on generic type packs in non-strict mode.
- Update type signature of `setmetatable` to be `<T, MT>(T, MT) ->
setmetatable<T, MT>`.
- Make local type aliases available in type functions. For example:
```
type Foo = number
type Array<T> = {T}

type function Bar(t)
  return types.unionof(Foo, Array(t))
end
```

## VM/Runtime
- Make sure `lua_unref` doesn't accept refs which did not exist in the
table.

---

Co-authored-by: Andy Friesen <afriesen@roblox.com>
Co-authored-by: Ariel Weiss <aaronweiss@roblox.com>
Co-authored-by: Hunter Goldstein <hgoldstein@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: Menarul Alam <malam@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-05-30 11:17:49 -07:00
..
Anyification.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
ApplyTypeFunction.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
AstJsonEncoder.cpp Sync to upstream/release/672 (#1800) 2025-05-02 14:00:23 -07:00
AstQuery.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
Autocomplete.cpp Sync to upstream/release/663 (#1699) 2025-02-28 14:42:30 -08:00
AutocompleteCore.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
AutocompleteCore.h Sync to upstream/release/651 (#1513) 2024-11-08 13:41:45 -08:00
BuiltinDefinitions.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Clone.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
Constraint.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
ConstraintGenerator.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
ConstraintSolver.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
DataFlowGraph.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
DcrLogger.cpp Sync to upstream/release/637 (#1354) 2024-08-02 07:30:04 -07:00
Def.cpp Sync to upstream/release/669 (#1770) 2025-04-11 17:44:21 -07:00
Differ.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
EmbeddedBuiltinDefinitions.cpp Sync to upstream/release/674 (#1832) 2025-05-16 12:39:58 -07:00
EqSatSimplification.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
Error.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
ExpectedTypeVisitor.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
FileResolver.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
FragmentAutocomplete.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Frontend.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Generalization.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
GlobalTypes.cpp Sync to upstream/release/666 (#1747) 2025-03-21 14:43:00 -07:00
InferPolarity.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Instantiation.cpp Sync to upstream/release/672 (#1800) 2025-05-02 14:00:23 -07:00
Instantiation2.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
IostreamHelpers.cpp Sync to upstream/release/674 (#1832) 2025-05-16 12:39:58 -07:00
JsonEmitter.cpp Sync to upstream/release/543 (#657) 2022-09-01 16:14:03 -07:00
Linter.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
LValue.cpp Sync to upstream/release/527 (#491) 2022-05-19 17:02:24 -07:00
Module.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
NonStrictTypeChecker.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Normalize.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
OverloadResolution.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
Quantify.cpp Sync to upstream/release/665 (#1732) 2025-03-14 13:11:24 -07:00
Refinement.cpp Sync to upstream/release/664 (#1715) 2025-03-07 10:07:27 -08:00
RequireTracer.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
Scope.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Simplify.cpp Sync to upstream/release/672 (#1800) 2025-05-02 14:00:23 -07:00
Substitution.cpp Sync to upstream/release/674 (#1832) 2025-05-16 12:39:58 -07:00
Subtyping.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Symbol.cpp Sync to upstream/release/664 (#1715) 2025-03-07 10:07:27 -08:00
TableLiteralInference.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
ToDot.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
TopoSortStatements.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
ToString.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
Transpiler.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TxnLog.cpp Sync to upstream/release/668 (#1760) 2025-04-04 14:11:51 -07:00
Type.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeArena.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
TypeAttach.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
TypeChecker2.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypedAllocator.cpp Add #include <stdint.h> to fix building with gcc 15 (#1720) 2025-03-10 06:02:09 -07:00
TypeFunction.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeFunctionReductionGuesser.cpp Sync to upstream/release/671 (#1787) 2025-04-25 14:19:27 -07:00
TypeFunctionRuntime.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeFunctionRuntimeBuilder.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeIds.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeInfer.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
TypeOrPack.cpp Sync to upstream/release/600 (#1076) 2023-10-20 18:10:30 -07:00
TypePack.cpp Sync to upstream/release/674 (#1832) 2025-05-16 12:39:58 -07:00
TypePath.cpp Sync to upstream/release/675 (#1845) 2025-05-27 14:24:46 -07:00
TypeUtils.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00
Unifiable.cpp Sync to upstream/release/653 (#1541) 2024-11-22 13:00:51 -08:00
Unifier.cpp Sync to upstream/release/672 (#1800) 2025-05-02 14:00:23 -07:00
Unifier2.cpp Sync to upstream/release/676 (#1856) 2025-05-30 11:17:49 -07:00