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
JohnnyMorganz
changed the title
New solver: explicitly typed table (e.g., for OOP) does not apply types onto methods
New solver: explicitly typed table does not apply types onto function/method declarations
Nov 9, 2024
type Tbl = {
func: (string) -> number
}
local Impl = {} :: Tbl
Impl.func = function(x) end
-- error above! type mismatch
I thought maybe the new solver was being smart and realizing that we had a local table that can be mutated, but no, it's weird that these two examples are misaligned ... I vaguely remember an issue flying by about how the inline function syntax acts differently than assigning a closure.
This definition works in the old solver, but fails in the new solver:
The text was updated successfully, but these errors were encountered: