www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11058] New: deprecated message doesn't work with selective imports

http://d.puremagic.com/issues/show_bug.cgi?id=11058

           Summary: deprecated message doesn't work with selective imports
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2013-09-17 10:43:19 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 17 2013