Bug 23825 – No warnings printed for aliases to deprecated struct or class members

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-04-05T06:13:54Z
Last change time
2024-12-13T19:28:12Z
Keywords
accepts-invalid
Assigned to
No Owner
Creator
elpenguino+D
Moved to GitHub: dmd#20257 →

Comments

Comment #0 by elpenguino+D — 2023-04-05T06:13:54Z
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.
Comment #1 by razvan.nitu1305 — 2023-04-05T07:59:06Z
*** Issue 23823 has been marked as a duplicate of this issue. ***
Comment #2 by robert.schadek — 2024-12-13T19:28:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20257 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB