[backport] Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent (#20578)

* Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent

* Add test

* Update compiler/lookups.nim

Co-authored-by: SirOlaf <a>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
SirOlaf 2022-10-18 20:56:38 +02:00 • committed by GitHub
commit 2f441ac675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -353,3 +353,18 @@ block gensym3:
echo a ! b ! c ! d
echo a ! b ! c ! d ! e
echo x,y,z
block identifier_construction_with_overridden_symbol:
# could use add, but wanna make sure it's an override no matter what
func examplefn = discard
func examplefn(x: int) = discard
# the function our template wants to use
func examplefn1 = discard
template exampletempl(n) =
# attempt to build a name using the overridden symbol "examplefn"
`examplefn n`()
exampletempl(1)