mirror of https://github.com/astral-sh/ruff
## Summary I found this bug while working on #20528. The minimum reproducible code is: ```python from __future__ import annotations from typing import NamedTuple from ty_extensions import is_disjoint_from, static_assert class Path(NamedTuple): prev: Path | None key: str static_assert(not is_disjoint_from(Path, Path)) ``` A stack overflow occurs when a nominal instance type inherits from `NamedTuple` and is defined recursively. This PR fixes this bug. ## Test Plan mdtest updated |
||
|---|---|---|
| .. | ||
| corpus | ||
| mdtest | ||
| primer | ||
| README.md | ||
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.