Given;
--!strict
type ST = {
Member1: number,
Name: string
}
local function access<T>(t, field: T): index<ST, T>
return t[field]
end
local t: any = {}
local _b = access<<"Member1">>(t, "Member1")
, _b should infer to number. However, the index type function seemingly does not simplify in this case and T is always inferred as any:
