[Issue 13868] New: Types with the same name in different packages produce poor diagnostics
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Dec 15 16:33:58 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13868
Issue ID: 13868
Summary: Types with the same name in different packages produce
poor diagnostics
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: redballoon36 at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list