Files
Nim/tests/errmsgs
metagn 34719cad9d allow untyped arguments to fail to compile in overload mismatch error (#23984)
fixes #8697, fixes #9620, fixes #23265

When matching a `template` with an `untyped` argument fails because of a
mismatching typed argument, `presentFailedCandidates` tries to sem every
single argument to show their types, but trying to type the `untyped`
argument can fail if it's supposed to use an injected symbol, so we get
an unrelated error message like "undeclared identifier".

Instead we use `tryExpr` as the comment suggests, setting the type to
`untyped` if it fails to compile. We could also maybe check if an
`untyped` argument is expected in its place and not try to compile the
expression if it is but this would require a bit of reorganizing the
code here and IMO it's better to have the information of what type it
would be if it can be typed.
2024-08-20 11:43:11 +02:00
..
2018-07-05 15:51:04 +02:00
2018-07-02 22:53:00 +02:00
2018-12-11 21:23:22 +01:00
2021-04-06 16:20:01 +02:00
2020-03-22 20:01:01 +01:00
2022-09-23 13:05:05 +02:00
2021-06-22 12:44:56 +02:00
2023-01-18 21:40:00 +01:00
2018-04-21 22:49:15 +02:00
2021-04-06 16:20:01 +02:00
2019-07-08 15:24:20 -07:00
2021-04-06 16:20:01 +02:00
2021-04-06 16:20:01 +02:00
2021-04-06 16:20:01 +02:00