[Issue 14580] New: Context transmitted through alias template parameter for local functions, but not methods

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 12 13:07:27 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14580

          Issue ID: 14580
           Summary: Context transmitted through alias template parameter
                    for local functions, but not methods
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: thecybershadow at gmail.com

This is inconsistent:

//////////// test.d ///////////
class C
{
    void method() {}

    void fun()
    {
        void local() {}

        call!local();  // OK
        call!method(); // Error
    }
}

void call(alias f)()
{
    f();
}
///////////////////////////////

--


More information about the Digitalmars-d-bugs mailing list