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

RazvanN <razvan.nitu1...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1...@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1...@gmail.com> ---
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.

--

Reply via email to