luau-lang/luau

`any` as generic `T` incompatible with `{T}` in new type solver's strict mode

Closed this issue · 1 comments

--!strict
function f<T>(a : {T}, b : T)
end

f({}, nil :: any) -- TypeError: Type 'number' could not be converted into 'number' in an invariant context

table.insert({} :: {any}, nil :: any) -- TypeError: None of the overloads for function that accept 2 arguments are compatible.

Tested on 0.627, with no errors in non-strict mode.

Fixed as of 0.635.