[Issue 24817] UDA on nested template does not work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 15 13:40:01 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24817
Adam D. Ruppe <destructionator at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |destructionator at gmail.com
--- Comment #1 from Adam D. Ruppe <destructionator at gmail.com> ---
well i have a fix for it
idk what side effects it has. but in dmd's parse.d, it is line 4880ish in my
branch
search for the comment "A template parameter list means it's a function
template"
rn *above* that line is a block `if (udas) { ... }`
move that block to *below* that `if(tpl)` condition
so then it attaches to the wrapped template instead of the function it is
wrapping
passes all tests *there*. idk about other potential regressions, but it did
leave the udas accessible via the instance
and the code change passes my gut test- the parser is doing a rewrite but
attached udas before wrapping the template and now it attaches udas at the end
fixed in opend on next push at least lol
--
More information about the Digitalmars-d-bugs
mailing list