When performing a dynamic property access on an enum or the global Enum object, a type error is thrown, warning about a potentially unsafe operation where the indexed enum may not exist at runtime. However due to the fact that enums are constants this case can never occur as they are immutable and always loaded.
--!strict
local str, otherStr = 'KeyCode', 'H'
local _ = Enum[str] --Attempting a dynamic property access on type 'Enums' is unsafe and may cause exceptions at runtime
local _ = Enum.KeyCode[otherStr] --Attempting a dynamic property access on type 'typeof(Enum.KeyCode)' is unsafe and may cause exceptions at runtime
This did not occur previously and may be related to the fix here:
Expected behavior
No type error is reported, matching the original behavior.