mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
![]() ## Summary I found this bug while working on #18041. The following code leads to infinite recursion. ```python from ty_extensions import is_disjoint_from, static_assert, TypeOf class C: @property def prop(self) -> int: return 1 static_assert(not is_disjoint_from(int, TypeOf[C.prop])) ``` The cause is a trivial missing binding in `is_disjoint_from`. This PR fixes the bug and adds a test case (this is a simple fix and may not require a new test case?). ## Test Plan A new test case is added to `mdtest/type_properties/is_disjoint_from.md`. |
||
---|---|---|
.. | ||
mdtest | ||
primer | ||
README.md |
Markdown files within the mdtest/
subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs
integration test.
See crates/ty_test/README.md
for documentation of this test format.