[Issue 10415] New: Bad error message with const property of const class instance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 19 10:23:03 PDT 2013


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

           Summary: Bad error message with const property of const class
                    instance
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-06-19 10:23:02 PDT ---
Title: 
Component: dmd
Severity: 
Code number: 
Keywords: 
Outcome: 
Is done: no
See also: 


class Foo {
    @property int bar() const {
        return 0;
    }
    @property void bar(int) {}
}
void main() {
    const x = new Foo;
    x.bar = 1;
}



DMD 2.063.2 gives a bad error message, that is wrong and doesn't explain the
true nature of the problem:

test.d(9): Error: not a property x.bar

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