www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21268] New: Redundant storage classes are allowed for user

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

          Issue ID: 21268
           Summary: Redundant storage classes are allowed for user defined
                    types
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

For instance, 'ref' can be use in any class, struct, union, or enum
declaration.

---
ref struct S
{
    int member;
}

ref class C
{
    int member;
}

ref enum E
{
    member,
}

ref union U
{
    int member;
}
---

This storage class has no effect on the type, unlike 'const', as a counter
example.

--
Sep 22 2020