www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17582] New: Applying const to struct declaration should make

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

          Issue ID: 17582
           Summary: Applying const to struct declaration should make the
                    struct type const
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

The following should compile:

  const struct S {
    int x;
  }

  static assert(is(S == const(S)));

--
Jul 01