www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15900] New: [REG 2.071] (Import deprecation) Public import

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

          Issue ID: 15900
           Summary: [REG 2.071] (Import deprecation) Public import ignored
                    when using fully qualified name
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

///////////// test.d /////////////
import std.datetime;

unittest
{
    cast(void)core.time.hnsecs(1);
}
//////////////////////////////////

$ dmd -w -unittest -o- test.d 
test.d(5): Deprecation: module core.time is not accessible here, perhaps add
'static import core.time;'

However, std.datetime publicly imports core.time, so the warning is spurious.
The code compiles fine when NOT using the fully-qualified name.

--
Apr 08 2016