Files
Nim/tests/template
metagn 75b9d66582 treat resolved symbols on RHS of module qualification as identifiers (#24180)
fixes #19866 given #23997

When searching for a module-qualified symbol, `qualifiedLookUp` tries to
obtain the raw identifier from the RHS of the dot field. However it only
does this when the RHS is either an `nkIdent` or an `nkAccQuoted` node,
not when the node is a resolved symbol or a symchoice, such as in
templates and generics when the module symbol can't be resolved yet.
Since the LHS is a module symbol when the compiler checks for this, any
resolved symbol information doesn't matter, since it has to be a member
of the module. So we now obtain the identifier from these nodes as well
as the unresolved identifier nodes.

The test is a bit niche and possibly not officially supported, but this
is likely a more general problem and I just couldn't think of another
test that would be more "proper". It's better than the error message
`'a' has no type` at least.
2024-09-27 09:34:13 +02:00
..
2018-04-18 21:19:23 +02:00
2016-08-04 01:37:41 +02:00
2021-04-01 08:47:59 +02:00
2021-05-31 13:27:44 +02:00
2023-04-26 08:02:44 +02:00
2018-12-11 21:23:22 +01:00
2017-03-06 18:38:15 +01:00
2020-08-27 15:50:59 +02:00
2019-08-23 16:15:02 +02:00
2017-07-25 09:28:23 +02:00
2020-10-30 09:59:56 +01:00
2019-05-29 22:21:51 +02:00
2018-12-11 21:23:22 +01:00
2017-07-25 09:28:23 +02:00