[Issue 19999] compile time logic (pragma, static if) in sub eponymous templates are ignored

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 23 03:54:40 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19999

--- Comment #1 from David Bennett <davidbennett at bravevision.com> ---
Here is a reduced case, it seems like the algorithm dies at the static if
making the inner template not match, in-turn preventing the pragma and static
if from running.

For example if you remove the static if in this example the pragma will run.

```
template fun3()
{
    template fun3(T) 
    {
        pragma(msg, "test pragma");
        static if(true)
            void fun3(T t){}
    }
}

void main()
{
    fun3!()(1);
}
```

--


More information about the Digitalmars-d-bugs mailing list