Luau doesn't recognize generic Enum.GetEnumItems

--!strict
function f(enum: Enum)
   local v = enum:GetEnumItems()
   --> Key 'GetEnumItems' not found in table 'Enum'
end

Enum.GetEnumItems should be a (Enum)->{EnumItem}. To be clear, this bug is with the generic Enum type. Each specific enum type does have a GetEnumItems function in its type description.

2 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

4 Likes

A fix for the issue has been released.

2 Likes