http://d.puremagic.com/issues/show_bug.cgi?id=6570
Summary: 'this' silently passes from one object to another Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: alienballa...@gmail.com --- Comment #0 from Mariusz GliwiĆski <alienballa...@gmail.com> 2011-08-29 03:42:57 PDT --- <code> import std.stdio; class T { abstract string type() { return "T"; } } class T2 : T { override string type() { return "T2"; } void test(T)() { writeln(T.type); } } void main() { (new T2).test!T(); } </code> <output>T2</output> type() isn't static method so AFAIK it shouldn't be possible to call it from test(). Instead of that, call is possible, and local 'this' is used. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------