duplicate symbols

Dmitri Makarov via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Apr 10 02:54:31 PDT 2015


Should the compiler issue an error for this code?

struct S
{
}

string generate(S t)
{
   return "";
}

string generate(S t)
{
   return "huh?";
}

It compiles and breaks with multiple definition of 
'_D1b8generateFS1b1SZAya' at link time. dmd v2.067


More information about the Digitalmars-d-learn mailing list