Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/Common/include/Luau/ExperimentalFlags.h
2727 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include <string.h>
5
6
namespace Luau
7
{
8
9
inline bool isAnalysisFlagExperimental(const char* flag)
10
{
11
// Flags in this list are disabled by default in various command-line tools. They may have behavior that is not fully final,
12
// or critical bugs that are found after the code has been submitted. This list is intended _only_ for flags that affect
13
// Luau's type checking. Flags that may change runtime behavior (e.g.: parser or VM flags) are not appropriate for this list.
14
static const char* const kList[] = {
15
"LuauInstantiateInSubtyping", // requires some fixes to lua-apps code
16
"LuauFixIndexerSubtypingOrdering", // requires some small fixes to lua-apps code since this fixes a false negative
17
"LuauSolverV2",
18
"UseNewLuauTypeSolverDefaultEnabled", // This can change the default solver used in cli applications, so it also needs to be disabled. Will
19
// require fixes in lua-apps code
20
// makes sure we always have at least one entry
21
nullptr,
22
};
23
24
for (const char* item : kList)
25
if (item && strcmp(item, flag) == 0)
26
return true;
27
28
return false;
29
}
30
31
} // namespace Luau
32
33