You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The matter of fact is that `__traits(getMember, file1, "std")` sees file1.std as a package, while getProtection sees file1.std as an import. `__traits(isSame)` compares them equally because [1] made it smart enough to compare them.
The situation is a bit complicated because you cannot identify imports by their first package. Consider this example:
//file1.d
public import std.stdio;
private import std.traits;
//file2.d
pragma(msg, __traits(getProtection, file1.std));
The invocation in file2 is ambiguous in this situation. However, if getProtection would consider file.std as a package and not an import it would pretty much become useless because the module itself is always public. I think that we need to come up with a way of identifying imports.
[1]https://github.com/dlang/dmd/pull/7095/files
basile-z reported this on 2018-08-06T08:58:46Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=19144
CC List
Description
The text was updated successfully, but these errors were encountered: