mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-26 01:48:17 +00:00
## Summary
Currently we do not emit an error on this code:
```py
from ty_extensions import Not
def f[T](x: T, y: Not[T]) -> T:
x = y
return x
```
But we should do! `~T` should never be assignable to `T`.
This fixes a small regression introduced in
|
||
|---|---|---|
| .. | ||
| legacy | ||
| pep695 | ||
| builtins.md | ||
| scoping.md | ||