You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon analysis of a luau-lsp failing test for the new solver, it was discovered that for overloaded table/class function properties using an IntersectionType, magic functions are never called.
Unfortunately, I don't think theres a workaround from luau-lsp's side for now; so this is the only blocker compared to the old solver as of yet on that side of things.
The text was updated successfully, but these errors were encountered:
After looking at how Studio behaves with the WaitForChild type, I came up with pretty identical behavior using a magic function to make the instance type optional when timeout argument is present instead of using an overload through an IntersectionType as a workaround.
Upon analysis of a luau-lsp failing test for the new solver, it was discovered that for overloaded table/class function properties using an IntersectionType, magic functions are never called.
This is because the overloaded type is only resolved after the magic functions are attempted to be called. See here:
https://github.com/luau-lang/luau/blob/master/Analysis/src/ConstraintSolver.cpp#L1209-L1216 (where ftv will be invalid, because it is an IntersectionType)
https://github.com/luau-lang/luau/blob/master/Analysis/src/ConstraintSolver.cpp#L1244-L1260 (the code immediately afterwards, with a valid function type)
Unfortunately, I don't think theres a workaround from luau-lsp's side for now; so this is the only blocker compared to the old solver as of yet on that side of things.
The text was updated successfully, but these errors were encountered: