[Issue 23942] New: deprecated public import

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 29 14:32:41 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23942

          Issue ID: 23942
           Summary: deprecated public import
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dlang-bugzilla at thecybershadow.net

Consider a module which provides a public import, but wants to stop providing
it.

"deprecated public import" currently compiles, but doesn't seem to do anything.
It would be nice if it caused a deprecation warning every time another module
used it to use a symbol in the public-imported module.

// pub.d
int someSymbol;
// mod.d
deprecated public import pub;
// user.d
import mod;
int fun() { return someSymbol; } // should cause a deprecation warning

--


More information about the Digitalmars-d-bugs mailing list