# template fn( T ) { # void fn() { # } # } # # template fn( T ) { # void fn( T val ) { # } # } # # void main() { # mixin fn!(int); # } DMD-1.010: nocompile/t/template_25_A.d(18): template dstress.nocompile.t.template_25_A.fn(T) conflicts with dstress.nocompile.t.template_25_A.fn(T) at nocompile/t/template_25_A.d(13) DMD-1.013: nocompile/t/template_25_A.d(24): mixin fn!(int) matches more than one template declaration, fn(T) and fn(T) test cases: http://dstress.kuehne.cn/nocompile/t/template_25_A.d http://dstress.kuehne.cn/nocompile/t/template_class_17.d http://dstress.kuehne.cn/nocompile/t/template_struct_07.d
quick easy fix for this one (against dmd 2.x, but likely applies easily enough to 1.x): diff --git a/src/template.c b/src/template.c --- a/src/template.c +++ b/src/template.c @@ -4313,8 +4313,10 @@ TemplateDeclaration *TemplateInstance::findBestMatch(Scope *sc) } if (td_ambig) { - error("%s matches more than one template declaration, %s and %s", - toChars(), td_best->toChars(), td_ambig->toChars()); + error("%s matches more than one template declaration, %s(%d):%s and %s(%d):%s", + toChars(), + td_best->loc.filename, td_best->loc.linnum, td_best->toChars(), + td_ambig->loc.filename, td_ambig->loc.linnum, td_ambig->toChars()); } /* The best match is td_best Results in: bug1193.d(12): Error: mixin fn!(int) matches more than one template declaration, bug1193.d(1):fn(T) and bug1193.d(6):fn(T)
http://www.dsource.org/projects/dmd/changeset/515