You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect type inference for value of enum member with mixin #3159
Thanks for reporting @DerBiasto Confirmed that Foo.bar.value incorrectly infers Meta instead of int on the latest build (v0.60.0).
This is a separate issue from #1982 (which was about overload resolution with enum literals and is already fixed). The root cause here is in mixed_in_enum_data_type() — it treats the first non-Enum base class as the data type, but doesn't distinguish between actual data types (like int in IntEnum) and plain mixins (like Meta which just provides methods).
Activity
NathanTempest commentedon Apr 16, 2026
Thanks for reporting @DerBiasto Confirmed that Foo.bar.value incorrectly infers Meta instead of int on the latest build (v0.60.0).
This is a separate issue from #1982 (which was about overload resolution with enum literals and is already fixed). The root cause here is in mixed_in_enum_data_type() — it treats the first non-Enum base class as the data type, but doesn't distinguish between actual data types (like int in IntEnum) and plain mixins (like Meta which just provides methods).
cc @yangdanny97
NathanTempest commentedon Apr 16, 2026
Looks like an easy fix where we could differentiate between a datatype Enum class and a Mixin class by the use of new
Assigning this to myself for the fix
Fix incorrect type inference for enum member .value with mixin