https://d.puremagic.com/issues/show_bug.cgi?id=11872
Summary: Support for overloaded template functions in with block Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: longestpa...@gmail.com --- Comment #0 from Adam S <longestpa...@gmail.com> 2014-01-05 12:18:57 PST --- When using a 'with' statement, attempting to call an overloaded template function produces an error. --------------- class Foo { auto test(int v)() {} auto test(int v)(string) {} } auto bar = new Foo; with (bar) { //test!2(); //fails bar.test!2(); //works } --------------- When the comments are removed, the above produces: Error: need 'this' for 'test' of type 'pure nothrow @safe void()' Calling non-overloaded template functions works as expected. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------