http://d.puremagic.com/issues/show_bug.cgi?id=5946
Summary: failing lookup 'this' from function in template Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-05-07 06:58:08 PDT --- Following code compile fails with https://github.com/D-Programming-Language/dmd/commit/3fcc2344681ab9d31d1897188f36051c9beb247f ---- template TTest1() { int call(){ return this.g(); } } class CTest1 { int f() { mixin TTest1!(); return call(); } int g() { return 10; } } void main() { assert((new CTest1()).f() == 10); } ---- test.d(3): Error: 'this' is only defined in non-static member functions, not call test.d(7): Error: mixin test.CTest1.f.TTest1!() error instantiating ---- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------