Bug 21259 – struct initialization with deprecated fields should issue deprecation warnings

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-09-17T13:30:41Z
Last change time
2020-09-18T08:52:38Z
Keywords
pull
Assigned to
No Owner
Creator
Seb

Comments

Comment #0 by greeenify — 2020-09-17T13:30:41Z
--- struct Foo { int bar; deprecated alias width = foo; } void main() { Foo s = { width: 100}; } --- This should print a "`width` is deprecated" message.
Comment #1 by razvan.nitu1305 — 2020-09-18T02:44:21Z
I guess you meant: `deprecated alias width = bar`.
Comment #2 by dlang-bot — 2020-09-18T03:34:11Z
@RazvanN7 created dlang/dmd pull request #11752 "Fix Issue 21259 - struct initialization with deprecated fields should issue deprecation warnings" fixing this issue: - Fix Issue 21259 - struct initialization with deprecated fields should issue deprecation warnings https://github.com/dlang/dmd/pull/11752
Comment #3 by dlang-bot — 2020-09-18T05:51:57Z
dlang/dmd pull request #11752 "Fix Issue 21259 - struct initialization with deprecated fields should issue deprecation warnings" was merged into master: - e3320af3c2ea1b83f256d87979963b8be03da66f by RazvanN7: Fix Issue 21259 - struct initialization with deprecated fields should issue deprecation warnings https://github.com/dlang/dmd/pull/11752
Comment #4 by dlang-bot — 2020-09-18T08:52:38Z
dlang/dmd pull request #11755 " Issue 21259 - struct initialization with deprecated fields inside a deprecated scope" was merged into master: - 135a2993e8e73cb2c9be3fb2d6f8e113958febff by Sebastian Wilzbach: Issue 21259 - struct initialization with deprecated fields inside a deprecated scope https://github.com/dlang/dmd/pull/11755