mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-21 15:52:34 +00:00
[ty] Use separate Rust types for bound and unbound type variables (#19796)
This PR creates separate Rust types for bound and unbound type variables, as proposed in https://github.com/astral-sh/ty/issues/926. Closes https://github.com/astral-sh/ty/issues/926 --------- Co-authored-by: Carl Meyer <carl@astral.sh>
This commit is contained in:
parent
f3f4db7104
commit
dc84645c36
23 changed files with 846 additions and 560 deletions
|
@ -102,7 +102,7 @@ def silence[T: type[BaseException]](
|
|||
try:
|
||||
func()
|
||||
except exception_type as e:
|
||||
reveal_type(e) # revealed: T'instance
|
||||
reveal_type(e) # revealed: T'instance@silence
|
||||
|
||||
def silence2[T: (
|
||||
type[ValueError],
|
||||
|
@ -111,7 +111,7 @@ def silence2[T: (
|
|||
try:
|
||||
func()
|
||||
except exception_type as e:
|
||||
reveal_type(e) # revealed: T'instance
|
||||
reveal_type(e) # revealed: T'instance@silence2
|
||||
```
|
||||
|
||||
## Invalid exception handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue