[Issue 3052] New: Passing alias to member function does not work (2/2)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 4 11:46:06 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3052

           Summary: Passing alias to member function does not work (2/2)
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


class A
{
    A next;

    static void fun(alias fun)(A n)
    {
        assert(0);
    }

    static void gun()
    {
        void hun(A a)
        {
        }
        fun!(hun)(next);
    }
}

Even after making all functions static, the code does not work with the error:

template instance cannot use local 'hun' as parameter to non-global template
fun(alias fun)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list