Consider the following modules:
first.d:
struct A { }
second.d
struct A { }
third.d:
import first;
import second;
void main()
{
first.A a;
second.a b;
a = b;
}
Compiling these three files together produces the following error message:
Error: cannot implicitly convert expression (b) of type A to A
When it is not immediately clear that a and b come from different packages, this error message is not helpful. When the names of the types are similar, it would be helpful to have the package / module name emitted in the diagnostic.
Comment #1 by ketmar — 2014-12-16T08:20:00Z
i dare to say that it will be helpful to emit module name for any symbol that is not declared in the current module. 'cause simply importing std.string can cause this: http://forum.dlang.org/thread/[email protected]
and it's not obvious where that `count` came from.
Comment #2 by robert.schadek — 2024-12-13T18:38:26Z