simple idea for error messages

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 1 16:56:49 PDT 2016


when it cannot match a prototype eg:

module foo;
enum Foo
{
foo
}
void bar(Foo foo)
{
}
module bar;
enum Foo
{
foo
}

void fooBar(Foo foo)
{
   bar(foo);
}

rather than complain the type X does not match the type X - an 
unhelpful message - could the compiler not check to see if the 
type descriptions are identical, and if so print a clarifying 
message about which modules they come from.  it's easy the second 
time, but another source of friction in learning the language in 
the beginning.




More information about the Digitalmars-d-learn mailing list