Summary: taking the address of a @property doesn't work
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Trass3r <> 2011-03-11 08:50:19 PST ---
class A
    private int blub = 5;
    @property ref int bla()
    {return blub;}

void main()
    A a = new A();
    int* b = &a.bla;

property.d(11): Error: cannot implicitly convert expression (&a.bla) of type
int delegate() @property ref to int*

This only works by adding parentheses: &a.bla()
Shouldn't it work as expected without those for @property methods?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to