Douglas Creager
0fb94c052e
[ty] Infer parameter specializations of generic aliases ( #18021 )
...
This updates our function specialization inference to infer type
mappings from parameters that are generic aliases, e.g.:
```py
def f[T](x: list[T]) -> T: ...
reveal_type(f(["a", "b"])) # revealed: str
```
Though note that we're still inferring the type of list literals as
`list[Unknown]`, so for now we actually need something like the
following in our tests:
```py
def _(x: list[str]):
reveal_type(f(x)) # revealed: str
```
2025-05-12 22:12:44 -04:00
..
2025-05-12 22:02:25 -04:00
2025-05-12 22:02:25 -04:00
2025-05-12 22:12:44 -04:00
2025-05-03 19:49:15 +02:00
2025-05-06 20:11:25 -04:00
2025-05-12 22:02:25 -04:00
2025-05-06 20:11:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-09 14:54:05 -04:00
2025-05-03 19:49:15 +02:00
2025-05-09 13:40:51 -04:00
2025-05-12 22:02:25 -04:00
2025-05-09 17:39:15 +01:00
2025-05-12 22:02:25 -04:00
2025-05-12 22:12:44 -04:00
2025-05-09 14:57:14 -04:00
2025-05-09 17:39:15 +01:00
2025-05-03 19:49:15 +02:00
2025-05-12 18:58:14 -04:00
2025-05-03 19:49:15 +02:00
2025-05-09 17:39:15 +01:00
2025-05-03 19:49:15 +02:00
2025-05-12 20:30:21 -04:00
2025-05-06 20:11:25 -04:00
2025-05-12 22:02:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-06 20:11:25 -04:00
2025-05-12 22:02:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-06 20:11:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-12 22:02:25 -04:00
2025-05-05 12:12:38 -07:00
2025-05-07 15:51:13 +02:00
2025-05-06 20:11:25 -04:00
2025-05-09 13:40:51 -04:00
2025-05-06 20:11:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-06 12:37:10 +01:00
2025-05-06 20:11:25 -04:00
2025-05-12 20:30:21 -04:00
2025-05-10 10:46:08 +02:00
2025-05-03 19:49:15 +02:00
2025-05-12 22:02:25 -04:00
2025-05-09 13:40:51 -04:00
2025-05-09 17:39:15 +01:00
2025-05-03 19:49:15 +02:00
2025-05-09 14:57:14 -04:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-06 20:11:25 -04:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00