digitalmars.D.bugs - [Issue 18549] New: name gets overwritten in template definition
- d-bugmail puremagic.com (43/43) Mar 02 2018 https://issues.dlang.org/show_bug.cgi?id=18549
https://issues.dlang.org/show_bug.cgi?id=18549 Issue ID: 18549 Summary: name gets overwritten in template definition Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: mephisto nordhoff-online.de $ dmd --version DMD64 D Compiler v2.078.2 $ cat app.d ------ struct SS {} struct tt {} void tmpl( SS)() {} void tmpl( tt)() {} void main() { tmpl!SS(); tmpl!tt(); } ------ $ dmd app.d ------ sth.d(11): Error: sth.tmpl called with argument types () matches both: sth.d(6): sth.tmpl!(SS).tmpl() and: sth.d(7): sth.tmpl!(SS).tmpl() sth.d(12): Error: sth.tmpl called with argument types () matches both: sth.d(6): sth.tmpl!(tt).tmpl() and: sth.d(7): sth.tmpl!(tt).tmpl() ------ although I figured out I can fix it by defining the templates like `void tmpl( T : SS)() {}`, the compiler was using the same name for multiple template-definitions. Something must be wrong, I think --
Mar 02 2018