dmd 2.058 the code: template Foo(){ struct Range{ } } template Biz(){ struct Range{ } } class Bar{ mixin Foo!() index0; mixin Biz!() index1; auto to_range(Range)(Range r) { } } void main(){ auto r2 =Bar.to_range(1); } the fireworks: test.d(13): Error: test.Bar.Foo!().Range at test.d(2) conflicts with test.Bar.Biz!().Range at test.d(6)
Seems to work in git HEAD, after fixing some errors in the code: ------ template Foo(){ struct Range{ } } template Biz(){ struct Range{ } } class Bar{ mixin Foo!() index0; mixin Biz!() index1; auto to_range(Range)(Range r) { return r; // have to return something for r2 to have non-void type } } void main(){ auto r2 =Bar.init.to_range(1); // have to use .init to pass actual value to to_range } ------ With these changes, it can compile successfully; no more conflict errors. So looks like the bug has been fixed in git HEAD.
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e93599f1d3a130435879e93e85abe4a1180a9a98 fix Issue 7553 - auto template param triggers mixin conflict
Commit pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e93599f1d3a130435879e93e85abe4a1180a9a98 fix Issue 7553 - auto template param triggers mixin conflict