`EnumItem.EnumType` is missing in the Luau type checker

On Roblox, there’s an obscure member of the EnumItem type named EnumType which allows you to identify the parent Enum of the EnumItem, given a variable where typeof(variable) == "EnumItem".

For example, the following will evaluate to true:

local item = Enum.ActionType.Draw
print(item.EnumType == Enum.ActionType)

I observed this while using the Luau type checker beta:

5 Likes

In the meantime, you could probably do something like this instead:

image

However, this would only be a compile-time check that style is an Enum.EasingStyle. But your point still stands that the Luau type checker needs to be able to verify the EnumType member.

3 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.

2 Likes

This issue should now be resolved! If this issue is still occurring, please create a new topic for us to look into.

1 Like

Hi! This issue isn’t resolved even slightly. Its behavior is entirely unchanged!

image

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.