Douglas Creager
eda85f3c64
[ty] Constraining a typevar with itself (possibly via union or intersection) ( #21273 )
...
This PR carries over some of the `has_relation_to` logic for comparing a
typevar with itself. A typevar will specialize to the same type if it's
mentioned multiple times, so it is always assignable to and a subtype of
itself. (Note that typevars can only specialize to fully static types.)
This is also true when the typevar appears in a union on the right-hand
side, or in an intersection on the left-hand side. Similarly, a typevar
is always disjoint from its negation, so when a negated typevar appears
on the left-hand side, the constraint set is never satisfiable.
(Eventually this will allow us to remove the corresponding clauses from
`has_relation_to`, but that can't happen until more of #20093 lands.)
2025-11-05 12:31:53 -05:00
..
2025-11-03 21:50:25 +01:00
2025-11-02 12:39:55 -05:00
2025-11-03 22:06:56 +01:00
2025-05-17 08:27:32 -04:00
2025-10-01 14:26:17 +02:00
2025-11-03 16:57:49 -05:00
2025-10-27 11:19:12 +00:00
2025-09-17 09:45:25 +02:00
2025-11-03 16:57:49 -05:00
2025-08-04 20:13:50 +02:00
2025-11-03 10:38:20 -05:00
2025-06-26 14:29:33 +02:00
2025-10-17 17:13:40 +00:00
2025-10-03 17:14:51 -04:00
2025-05-09 13:40:51 -04:00
2025-10-12 18:39:32 +00:00
2025-11-03 10:38:20 -05:00
2025-11-02 18:21:54 -05:00
2025-11-05 15:03:19 +00:00
2025-11-03 10:38:20 -05:00
2025-11-03 15:24:01 -05:00
2025-11-02 14:35:33 +01:00
2025-10-27 11:19:12 +00:00
2025-11-03 21:50:25 +01:00
2025-11-03 15:41:11 +00:00
2025-10-19 10:58:25 +01:00
2025-05-03 19:49:15 +02:00
2025-11-03 16:57:49 -05:00
2025-10-27 11:19:12 +00:00
2025-10-27 11:19:12 +00:00
2025-10-18 12:44:21 +02:00
2025-11-03 10:38:20 -05:00
2025-10-27 11:19:12 +00:00
2025-11-05 12:31:53 -05:00
2025-10-27 11:19:12 +00:00
2025-05-06 20:11:25 -04:00
2025-09-29 21:08:08 +02:00
2025-05-03 19:49:15 +02:00
2025-07-30 11:51:21 +02:00
2025-11-03 10:38:20 -05:00
2025-11-03 16:57:49 -05:00
2025-10-27 11:19:12 +00:00
2025-10-21 19:13:36 +02:00
2025-05-09 13:40:51 -04:00
2025-10-01 16:40:30 +02:00
2025-07-22 16:10:38 +02:00
2025-10-23 09:34:39 +02:00
2025-10-01 15:51:53 +02:00
2025-10-31 16:51:11 -04:00
2025-05-03 19:49:15 +02:00
2025-11-04 16:29:55 +01:00
2025-09-07 18:25:35 +01:00
2025-11-03 10:38:20 -05:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-10-31 17:48:34 +01:00
2025-05-03 19:49:15 +02:00
2025-08-11 22:03:32 +01:00
2025-05-06 20:11:25 -04:00
2025-11-03 22:06:56 +01:00
2025-10-27 11:19:12 +00:00
2025-10-29 21:22:38 +00:00
2025-10-22 14:29:10 +02:00
2025-10-23 10:05:08 +02:00
2025-09-10 11:14:26 +00:00
2025-10-27 11:19:12 +00:00
2025-10-08 18:27:40 +01:00
2025-09-23 14:26:55 +00:00
2025-05-03 19:49:15 +02:00
2025-05-03 19:49:15 +02:00
2025-08-25 18:49:49 +00:00
2025-07-25 07:11:11 +00:00
2025-11-03 10:38:20 -05:00
2025-11-03 16:57:49 -05:00
2025-10-03 18:35:30 +01:00
2025-09-17 18:51:50 -04:00
2025-11-03 10:38:20 -05:00