Files
Nim/tests/stdlib
metagn 67ea754b7f 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.
2024-10-09 18:20:43 +02:00
..
2022-09-23 13:05:05 +02:00
2020-11-13 16:15:13 +08:00
2021-01-07 19:16:26 +01:00
2022-09-29 12:16:42 +02:00
2022-10-22 13:42:46 +02:00
2021-10-24 11:51:57 +02:00
2023-06-20 13:04:34 +02:00
2023-06-09 16:03:28 +02:00
2020-10-18 12:57:13 -04:00
2023-06-08 08:02:57 +02:00