D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15903 - [REG 2.071] module foo.bar is not accessible here, perhaps add 'static import foo.bar; (already there)
Summary: [REG 2.071] module foo.bar is not accessible here, perhaps add 'static import...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: Martin Nowak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-09 08:50 UTC by Timothee Cour
Modified: 2018-05-17 02:33 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Timothee Cour 2016-04-09 08:50:09 UTC
I am getting a nonsensical deprecation telling me to add static import foo.bar; when it's right there already

dmd version: 
DMD64 D Compiler v2.070-devel-36feb02 (but due to another bug I reported it's actually the latest 2.071)

...
static import foo.bar;
class Foo(T...)   if(foo.bar.fun!(foo.bar.baz!(int), T)) { ...} // deprecation msg
...
Comment 1 Timothee Cour 2016-04-09 08:50:58 UTC
[unfortunately seems hard to reduce]
Comment 2 Timothee Cour 2016-04-09 19:21:07 UTC
perhaps related to issue/15900 ?
Comment 3 Timothee Cour 2016-04-09 20:32:13 UTC
slightly different scenario but could be same root cause, with a minimal test case:

$dmd_071_X -o- -c D20160409T132716/main.d
Deprecation: module std.conv is not accessible here, perhaps add 'static import std.conv;'

----
module D20160409T132716.main;

import D20160409T132716.test;
void fun(){
  auto b=std.conv.to!string(0);
}
----
module D20160409T132716.test;
public static import std.conv;
----
Comment 4 TeddyBear12311 2016-06-07 17:30:53 UTC
Same problem after loading up some library code that worked in 2.68. I have several compiler problems now:


Deprecation: module std.traits is not accessible here, perhaps add 'static import std.traits;'		

same for std.algorithm.

Of course, std.traits is already imported.

mixin(1) Deprecation: Foo.min is not visible from module Bar		

min is suppose to be standard Math.min. Used to work fine, now it's not "visible".

Same for max.
Comment 5 Martin Nowak 2016-08-08 10:22:15 UTC
Issue 15900 got fixed in 2.071.2-b1, could you please retest.
Comment 6 Martin Nowak 2016-09-12 02:59:13 UTC
Can't reproduce the issues of comment 0 and comment 4, please retest and provide a complete test case.
Comment 3 is clearly a duplicate of issue 15000.
Comment 7 Martin Nowak 2016-09-12 03:00:00 UTC
(In reply to Martin Nowak from comment #6)
> Comment 3 is clearly a duplicate of issue 15000.

issue 15900
Comment 8 calex 2017-05-05 03:23:20 UTC
Any reasons this issue shouldn't be closed?

The issue this was suspected to duplicate was marked as resolved, and I can't reproduce Comment 3 on DMD v2.073.0.

(Just trying to help dlang cut through the 2,984 open DMD issues. They add up :))
Comment 9 Walter Bright 2018-05-17 02:33:31 UTC
Seems to be fixed. Reopen if not.