mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-02 01:40:54 +01:00
As always, a weekly Luau update! This week we have further improvements to new type solver, fixing a few of the popular issues reported. The fragment autocomplete is even more stable and we believe it's ready for broader use. Aside from that we have a few general fixes/improvements: * Fixed data race when multi-threaded typechecking is used, appearing as a random crash at the end of typechecking * AST data is now available from `Luau::Module` ## New Type Solver * Fixed type refinements made by function calls which could attach `nil` as an option of a type before (Fixes #1528) * Improved bidirectional typechecking in tables (Fixes #1596) * Fixed normalization of negated types * `getmetatable()` on `any` type should no longer report an error ## Fragment Autocomplete * Fixed auto-complete suggestions being provided inside multiline comments * Fixed an assertion failure that could happen when old type solver was used * Fixed issues with missing suggestions when multiple statements are on the same line * Fixed memory safety issues ## Internal Contributors Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Hunter Goldstein <hgoldstein@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
31 lines
1.3 KiB
C++
31 lines
1.3 KiB
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include <string.h>
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
inline bool isAnalysisFlagExperimental(const char* flag)
|
|
{
|
|
// Flags in this list are disabled by default in various command-line tools. They may have behavior that is not fully final,
|
|
// or critical bugs that are found after the code has been submitted. This list is intended _only_ for flags that affect
|
|
// Luau's type checking. Flags that may change runtime behavior (e.g.: parser or VM flags) are not appropriate for this list.
|
|
static const char* const kList[] = {
|
|
"LuauInstantiateInSubtyping", // requires some fixes to lua-apps code
|
|
"LuauFixIndexerSubtypingOrdering", // requires some small fixes to lua-apps code since this fixes a false negative
|
|
"StudioReportLuauAny2", // takes telemetry data for usage of any types
|
|
"LuauTableCloneClonesType3", // requires fixes in lua-apps code, terrifyingly
|
|
"LuauSolverV2",
|
|
// makes sure we always have at least one entry
|
|
nullptr,
|
|
};
|
|
|
|
for (const char* item : kList)
|
|
if (item && strcmp(item, flag) == 0)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
} // namespace Luau
|