-
Notifications
You must be signed in to change notification settings - Fork 496
Open
Labels
bugSomething isn't workingSomething isn't workingnew solverThis issue is specific to the new solver.This issue is specific to the new solver.
Description
Description
TEST_CASE_FIXTURE(ACBuiltinsFixture, "typefunc_dependency_issue1")
{
ScopedFastFlag sff[]{
{FFlag::LuauSolverV2, true},
};
CheckResult check1 = check(R"(
local tbl_A = {} :: typeof({entry1 = 1})
tbl_A.entry1b = "test"
type tbl_B = {entry2: nil}
local tbl_C = nil :: getmetatable< typeof( setmetatable({}, {entry3b="test"}) ) >
tbl_C.entry3 = "test"
tbl_C.entry4 = "test"
local test = nil :: typeof(tbl_C)
local tbl_ABC = nil :: typeof(tbl_A) & tbl_B & typeof(tbl_C)
local indexesABC = nil :: keyof<typeof(tbl_ABC)>
)");
auto test1 = requireType("indexesABC");
if (auto ty = follow(test1)->ty.get_if<UnionType>())
{
CHECK_EQ(ty->options.size(), 6);
}
else
LUAU_ASSERT(false); // It should be a UnionType
}Expected Result
That entry3 and entry4 is included inside indexesABC
Here is a result with #1425
Actual Result
Only 4 results show up, instead of 6.
entry3 and entry4 is missing, there used to be a time where I think I knew why it was missing. I think it's because it was trying to use stat assign on a pending expansion, don't recall anymore. I only remember that I made a variation of a fix for it and put everything there.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnew solverThis issue is specific to the new solver.This issue is specific to the new solver.

