Bug 11058 – deprecated message doesn't work with selective imports
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-17T10:43:19Z
Last change time
2019-08-24T22:59:00Z
Assigned to
No Owner
Creator
Martin Nowak
Comments
Comment #0 by code — 2013-09-17T10:43:19Z
cat > foo.d << CODE
enum bar = 0;
CODE
cat > bug.d << CODE
deprecated("msg") import foo : bar;
enum baz = bar;
CODE
cat > nobug.d << CODE
static import foo;
deprecated("msg") alias bar = foo.bar;
enum baz = bar;
CODE
dmd -c -o- bug.d
dmd -c -o- nobug.d
----
Using deprecation messages for selective imports doesn't work.
The compiler will only warn about the deprecation but misses the message.
Creating an alias by hand, as shown in nobug.d, works though.
Comment #1 by pro.mathias.lang — 2019-08-24T22:59:00Z
This works with 2.087.1, and probably a few version before.