[Issue 23824] New: No warnings printed for aliases to deprecated enum members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 5 05:59:45 UTC 2023


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

          Issue ID: 23824
           Summary: No warnings printed for aliases to deprecated enum
                    members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: elpenguino+D at gmail.com

This code produces no deprecation warnings:
```
struct S {
    deprecated enum value1 = 5;
}
alias shouldWarn = S.value1;
```
The shouldWarn alias should produce a warning. Referencing the alias does
produce a deprecation warning, however. Aliases to deprecated non-member enums
also produce warnings as expected.

--


More information about the Digitalmars-d-bugs mailing list