[Issue 15900] [REG 2.071] (Import deprecation) Public import ignored when using fully qualified name

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 13 11:24:23 PDT 2016


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

--- Comment #2 from Timothee Cour <timothee.cour2 at gmail.com> ---
(In reply to Timothee Cour from comment #1)
> (In reply to Vladimir Panteleev from comment #0)
> > ///////////// 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.
> 
> still there in 2.071.1 beta 2

this is also broken:

fun.d:
public import std.string
public static import std.string

main.d:
import fun;
void main(){
  auto a=std.string.isNumeric("12"); 
  // module std.string is not accessible here, perhaps add 'static import
std.string;'
}

--


More information about the Digitalmars-d-bugs mailing list