https://issues.dlang.org/show_bug.cgi?id=20744
Simen Kjaeraas <simen.kja...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simen.kja...@gmail.com --- Comment #2 from Simen Kjaeraas <simen.kja...@gmail.com> --- Definitely a compiler issue. It seems UDAs are being looked up in the scope where the result of `is(Func PT == __parameters)` is being used. Here's a very reduced example: module foo; import bar; struct S {} void f(@S int = 3); pragma(msg, ParameterDefaults!f.stringof); ----- module bar; //enum S = 3; // Uncomment to make things compile template ParameterDefaults(func...) { static if (is(typeof(func[0]) PT == __parameters)) { enum ParameterDefaults = (PT[0..1] args) @trusted { return *&(args[0]); }(); } } --