[Issue 6259] New: Property getters returning ref const() cause setters to be hidden

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 6 12:46:28 PDT 2011


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

           Summary: Property getters returning ref const() cause setters
                    to be hidden
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: ludwig at informatik.uni-luebeck.de


--- Comment #0 from Sönke Ludwig <ludwig at informatik.uni-luebeck.de> 2011-07-06 12:41:23 PDT ---
The following source will produce the following error on DMD 2.054beta:

bug1.d(10): Error: s.prop is not mutable

---
struct S {
    private int m_prop;
    ref const(int) prop() { return m_prop; }
    void prop(int v) { m_prop = v; } 
}

void test()
{
    S s;
    s.prop = 1;
}
---

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