Charlie Marsh
52ce26bd41
[ty] Avoid reporting overload errors for successful union variants ( #22688 )
...
## Summary
Consider `x: str | bytes` and then `x.split(" ")`. Because we have a
union, and at least one variant errors (`bytes` expects a `Buffer`, not
a `str`), we call `binding.report_diagnostics` for each variant. For the
`str` variant, it has two overloads that both match arity, but only one
actually matches the signature... So
`matching_overload_before_type_checking` is `None` (because they both
match arity), but we don't actually have an error, and we fall through
to `NO_MATCHING_OVERLOAD`.
If one variant succeeds, we should avoid reporting errors for it, even
if not _all_ variants matched.
2026-01-19 08:40:31 -05:00
..
2026-01-17 15:23:53 +00:00
2025-12-30 17:03:20 -05:00
2025-12-16 14:20:35 +00:00
2025-05-17 08:27:32 -04:00
2025-10-01 14:26:17 +02:00
2026-01-15 15:42:16 -05:00
2026-01-07 19:56:09 -05:00
2026-01-06 12:09:40 -05:00
2025-11-12 10:15:51 -08:00
2025-12-29 22:19:28 -05:00
2026-01-18 17:20:09 +00:00
2025-06-26 14:29:33 +02:00
2026-01-13 09:36:03 -05:00
2026-01-19 08:40:31 -05:00
2025-12-05 12:33:30 +00:00
2025-05-09 13:40:51 -04:00
2025-12-29 17:11:28 +00:00
2026-01-13 21:09:29 +00:00
2025-12-19 14:29:52 +01:00
2026-01-16 16:32:38 +00:00
2026-01-16 22:09:06 +00:00
2026-01-16 08:42:58 +00:00
2026-01-16 08:42:58 +00:00
2025-11-28 20:38:24 +01:00
2025-12-22 20:21:28 -05:00
2025-12-19 12:36:37 -05:00
2026-01-17 15:49:51 +00:00
2026-01-07 16:34:56 +00:00
2026-01-16 08:42:58 +00:00
2025-12-29 10:30:48 +01:00
2026-01-19 08:40:31 -05:00
2025-11-18 14:31:04 +01:00
2026-01-15 00:18:54 +00:00
2025-12-23 08:36:51 +01:00
2026-01-13 21:09:29 +00:00
2025-12-29 19:02:56 -08:00
2026-01-15 15:20:58 +00:00
2026-01-18 17:43:44 +00:00
2025-12-16 13:39:19 -05:00
2025-12-12 21:53:29 +00:00
2025-12-09 22:49:00 +01:00
2025-05-03 19:49:15 +02:00
2026-01-07 09:18:39 -08:00
2026-01-15 15:20:58 +00:00
2026-01-15 15:42:16 -05:00
2026-01-15 10:17:11 -05:00
2025-12-16 13:39:19 -05:00
2026-01-17 10:48:59 -05:00
2025-12-27 11:44:35 +00:00
2025-12-16 09:16:49 -08:00
2025-12-30 03:28:03 +00:00
2026-01-13 16:55:46 -05:00
2025-12-01 13:52:36 +01:00
2025-12-24 03:35:09 +00:00
2026-01-15 15:20:58 +00:00
2025-09-07 18:25:35 +01:00
2025-11-03 10:38:20 -05:00
2025-12-08 10:24:05 -05:00
2025-05-03 19:49:15 +02:00
2026-01-09 19:27:57 -05:00
2025-12-30 17:03:20 -05: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
2026-01-13 14:56:56 +00:00
2026-01-18 17:20:09 +00:00
2026-01-13 17:29:08 +00:00
2026-01-05 11:28:04 -08:00
2026-01-17 15:43:50 +00:00
2026-01-13 11:25:01 -08:00
2025-12-12 12:57:38 -05:00
2025-12-09 09:05:18 -08:00
2026-01-13 14:56:56 +00:00
2025-09-23 14:26:55 +00:00
2025-05-03 19:49:15 +02:00
2025-11-20 17:59:35 -08:00
2025-08-25 18:49:49 +00:00
2025-07-25 07:11:11 +00:00
2025-12-11 15:03:55 +00:00
2026-01-18 17:20:09 +00:00
2026-01-15 15:20:58 +00:00
2025-09-17 18:51:50 -04:00
2025-11-27 12:48:18 +00:00