metagn
21bdc8ff0f
remove conflicting default call in tables.getOrDefault ( #24265 )
...
fixes #23587
As explained in the issue, `getOrDefault` has a parameter named
`default` that can be a proc after generic instantiation. But the
parameter having a proc type [overrides all other
overloads](f73e03b132/compiler/semexprs.nim (L1203) )
including the magic `system.default` overload and causes a compile error
if the proc doesn't match the normal use of `default`. To fix this, the
`result = default(B)` initializer call is removed because it's not
needed, `result` is always set in `getOrDefaultImpl` when a default
value is provided.
This is still a suspicious behavior of the compiler but `tables` working
has a higher priority.
(cherry picked from commit 67ea754b7f )
2025-01-14 07:33:10 +01:00
..
2025-01-14 07:33:10 +01:00
2024-09-30 20:54:07 +02:00
2024-05-29 06:42:07 +02:00
2024-09-08 22:50:10 +02:00
2021-07-07 06:00:59 +02:00
2025-01-14 07:33:01 +01:00
2023-10-30 17:03:04 +01:00
2025-01-14 07:33:01 +01:00
2015-02-03 09:04:24 +01:00
2025-01-14 07:33:01 +01:00
2024-03-14 11:24:39 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2025-01-14 07:33:01 +01:00
2023-10-30 17:03:04 +01:00
2025-01-14 07:32:40 +01:00
2023-10-30 17:03:04 +01:00
2024-03-03 17:27:27 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2024-05-08 14:53:01 -06:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2015-10-01 12:05:45 -07:00
2022-11-26 16:35:30 +01:00
2024-05-16 23:22:49 +02:00
2023-11-17 22:06:46 +01:00
2024-04-06 14:21:55 +02:00
2023-05-28 19:40:37 +02:00
2024-06-02 09:36:20 +08:00
2024-07-26 20:45:52 +02:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2023-11-29 22:36:47 +01:00
2025-01-14 07:33:01 +01:00
2024-07-26 20:45:52 +02:00
2021-01-09 00:24:41 +01:00
2024-07-01 20:47:39 +02:00
2024-09-20 17:32:23 +02:00
2023-11-26 06:32:32 +01:00
2024-09-05 14:21:30 +08:00
2024-08-20 20:41:07 +08:00
2024-09-04 17:01:55 +08:00
2024-05-10 10:30:24 +02:00
2025-01-14 07:33:01 +01:00
2025-01-14 07:33:01 +01:00
2025-01-14 07:32:40 +01:00
2015-02-03 09:04:24 +01:00
2023-10-30 17:03:04 +01:00
2024-06-05 20:54:25 +02:00
2025-01-14 07:33:01 +01:00
2025-01-14 07:33:01 +01:00
2023-11-29 22:36:47 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2024-07-02 08:49:21 +02:00
2023-10-30 17:03:04 +01:00
2024-06-12 10:13:38 +08:00
2023-10-30 17:03:04 +01:00
2022-10-17 20:29:00 +02:00
2024-08-28 20:51:13 +02:00
2022-12-03 21:25:49 +08:00
2025-01-14 07:33:01 +01:00
2024-01-18 14:32:22 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2023-10-30 17:03:04 +01:00
2020-06-06 21:11:53 +02:00
2023-10-30 17:03:04 +01:00
2024-09-04 09:25:01 +02:00
2023-10-30 17:03:04 +01:00
2024-03-03 15:40:53 +01:00
2024-07-01 20:47:08 +02:00
2023-12-18 13:25:49 +08:00
2023-10-30 17:03:04 +01:00
2024-07-06 22:51:15 +02:00
2024-08-28 20:51:13 +02:00
2023-10-30 17:03:04 +01:00
2025-01-14 07:33:01 +01:00
2024-09-06 11:18:20 +02:00
2024-05-02 16:07:19 +08:00
2023-12-17 12:30:11 +01:00
2025-01-14 07:33:01 +01:00
2024-08-28 20:44:06 +02:00
2023-10-30 17:03:04 +01:00
2025-01-14 07:33:01 +01:00