http://d.puremagic.com/issues/show_bug.cgi?id=9100
--- Comment #2 from Kenji Hara <[email protected]> 2012-11-30 19:36:04 PST --- As a related note, this program runs successfully with no error in current compiler. It looks weird, but is expected from the view of language consistency. void main(){ (new C(1)).test(); } template Id(alias A) { alias Id = A; } class C { int n; this(int x){ n = x; } int fun(){ return n; } void test() { auto c = new C(2); assert(c.fun() == 2); alias f = Id!(c.fun); assert(f() == 1); // calls this.fun, not c.fun } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
