luau
luau copied to clipboard
`table.freeze` returns type `{+ +}` with new solver's strict mode
Tested on 0.627 with no errors in non-strict mode.
--!strict
type k = {
k: string,
}
function _(): k
return table.freeze({
k = "",
}) -- TypeError: Type pack '{+ +}' could not be converted into 'k'; at [0], {+ +} is not a subtype of k
end
Same is for table.clone()
local test: typeof(table.clone())
This is fixed.