Bug 15903 – [REG 2.071] module foo.bar is not accessible here, perhaps add 'static import foo.bar; (already there)
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-09T08:50:09Z
Last change time
2018-05-17T02:33:31Z
Assigned to
Martin Nowak
Creator
Timothee Cour
Comments
Comment #0 by timothee.cour2 — 2016-04-09T08:50:09Z
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 by timothee.cour2 — 2016-04-09T08:50:58Z
[unfortunately seems hard to reduce]
Comment #2 by timothee.cour2 — 2016-04-09T19:21:07Z
perhaps related to issue/15900 ?
Comment #3 by timothee.cour2 — 2016-04-09T20:32:13Z
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 by TeddyBear12311 — 2016-06-07T17:30:53Z
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 by code — 2016-08-08T10:22:15Z
Issue 15900 got fixed in 2.071.2-b1, could you please retest.
Comment #6 by code — 2016-09-12T02:59:13Z
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 by code — 2016-09-12T03:00:00Z
(In reply to Martin Nowak from comment #6)
> Comment 3 is clearly a duplicate of issue 15000.
issue 15900
Comment #8 by calex+bugzilla-mail — 2017-05-05T03:23:20Z
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 :))