Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse operator on BoolElement return incorrect result #13

Open
abelcheung opened this issue Mar 27, 2023 · 0 comments
Open

Reverse operator on BoolElement return incorrect result #13

abelcheung opened this issue Mar 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@abelcheung
Copy link
Owner

Due to current implementation in annotation, BoolElement inherits from int instead of bool (actually bool is @final and not subclassable). This causes inconsistency like:

reveal_type(bool | BoolElement) -> int
reveal_type(bool ** BoolElement) -> Any

The only fix is to explicitly list all dunders for all subclasses of ObjectifiedDataElement, so they are no more subclass of builtin types, and therefore overridable.

@abelcheung abelcheung self-assigned this Mar 27, 2023
@abelcheung abelcheung converted this from a draft issue Mar 27, 2023
@abelcheung abelcheung added the bug Something isn't working label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant