[Issue 23822] New: Deprecated struct alias ignored completely
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 5 04:55:51 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23822
Issue ID: 23822
Summary: Deprecated struct alias ignored completely
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
Consider this code:
```
alias Alias(alias A) = A;
deprecated alias value = Alias!5;
void main() { auto a = value; }
```
This correctly errors with Deprecation: alias `onlineapp.value` is deprecated
However, this code:
```
alias Alias(alias A) = A;
struct S { deprecated alias value = Alias!5; }
void main() { auto a = S.value; }
```
gives no warning at all and compiles with `-de`.
(enum works)
--
More information about the Digitalmars-d-bugs
mailing list