[Issue 6173] New: Compiler treats read access of a delegate's function pointer as an lvalue access

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 17 18:44:23 PDT 2011


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

           Summary: Compiler treats read access of a delegate's function
                    pointer as an lvalue access
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: schveiguy at yahoo.com


--- Comment #0 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-06-17 18:39:40 PDT ---
The following code:

struct S
{
   void foo();
}

void main()
{
   S s;
   auto fptr = (&s.foo).funcptr;
}

Generates the following error:

testdelegatefuncptr.d(9): Error: &s.foo is not an lvalue

But clearly, I'm not using &s.foo as an lvalue.

-- 
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