http://d.puremagic.com/issues/show_bug.cgi?id=4675
Summary: Eponymous Template should hide internal names Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2010-08-18 13:19:16 PDT --- Code: import std.stdio; void main() { } template isNumeric(T) { enum bool test1 = is(T : long); // should be hidden enum bool test2 = is(T : real); // should be hidden enum bool isNumeric = test1 || test2; } unittest { static assert(isNumeric!(int).test1); // should be an error writeln(isNumeric!(int).test1); // should be an error, but writes true writeln(isNumeric!(int).test2); // should be an error, but writes true } According to TDPL, calling isNumeric!(T) is rewritten by the compiler to isNumeric!(T).isNumeric, therefore hiding access to any other names. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------