[Issue 16248] New: nested const functions can mutate the aggregate members

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jul 7 05:31:02 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16248

          Issue ID: 16248
           Summary: nested const functions can mutate the aggregate
                    members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

This compiles without error

struct Foo
{
    int i;
    void bar()
    {
        void foo() const /*immutable as well*/
        {
            i = 1;
        }
        foo;
    }
}

--


More information about the Digitalmars-d-bugs mailing list