Open JohnnyMorganz opened 2 weeks ago
This also fails for static functions:
type Tbl = {
func: (string) -> number
}
local Impl = {} :: Tbl
function Impl.func(x)
-- old solver: x is string, new solver: x is unknown
end
Yeah something is not working as I'd expect:
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: