[Issue 23825] New: No warnings printed for aliases to deprecated struct or class members
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Apr 5 06:13:54 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23825
Issue ID: 23825
Summary: No warnings printed for aliases to deprecated struct
or class 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
The following code should produce eight deprecation warnings:
```
class S {
deprecated int a;
deprecated static int b;
}
struct S2 {
deprecated int a;
deprecated static int b;
}
void main() {
S s;
alias a1 = S.a;
alias a2 = s.a;
alias b1 = S.b;
alias b2 = s.b;
S2 s2;
alias c1 = S2.a;
alias c2 = s2.a;
alias d1 = S2.b;
alias d2 = s2.b;
}
```
As of DMD 2.103, none are produced. Referencing the aliases does produce
warnings, however.
--
More information about the Digitalmars-d-bugs
mailing list