Files
ruff/crates/red_knot_python_semantic/resources/mdtest/attributes.md
Alex d77480768d [red-knot] Port type inference tests to new test framework (#13719)
## Summary

Porting infer tests to new markdown tests framework.

Link to the corresponding issue: #13696

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2024-10-15 11:23:46 -07:00

174 B

Class attributes

Union of attributes

if flag:
    class C:
        x = 1
else:
    class C:
        x = 2

y = C.x
reveal_type(y)  # revealed: Literal[1, 2]