Is that wrong or is it just a bug, the type of the function parameters are unknown
type Dictionary<K, V> = {[K]: V}
function TableUtil.filter<K, V>(t: Dictionary<K, V>, predicate: (value: V, key: K) -> boolean): Dictionary<K, V>
local finalTable: Dictionary<K, V> = {}
for k, v in t do
if predicate(v, k) then
finalTable[k] = v
end
end
return finalTable
end
What is the type of players? Is the type checker at least getting that variable correct?
Edit: I think it’s a bug with the new type solver. If you disable it in the beta features and use the old version, it works as expected. Might be worth creating an issue on the github if one doesn’t already exist.