[Issue 18039] Deprecation: symbol is not visible from module when accessed in a with () of something that imports it

2018-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18039

RazvanN  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--


[Issue 18039] Deprecation: symbol is not visible from module when accessed in a with () of something that imports it

2018-02-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18039

RazvanN  changed:

   What|Removed |Added

 CC||razvan.nitu1...@gmail.com

--- Comment #1 from RazvanN  ---
The compiler does the right thing here. According to the spec:
https://dlang.org/spec/statement.html#WithStatement , the symbol resolution is
done by first searching the members of second. It then finds the selective
import and thinks that an illegal access is being made. That is correct and in
this case it is the user's job to disambiguate :

(1) writeln(third.Third.stringof)
(2) making the import in Struct second public
(3) making the import in Struct second non-selective (e.g. import third) 

Closing as invalid.

--