www.digitalmars.com         C & C++   DMDScript  

D - Ant

this compiles with flag '-c':

class Dup
{
	this(){}
	this(char[] good){}
	this(char[] bad){}
}
void main()
{
	new Dup;
}

if the empty ctor is removed the compilation fails.
if the instanciation is removed, it compiles even without the empty ctor.

when adding to a lib a warning
"already in library, redefinition ignored" (the DM linker?)
is printed but seems the first one got in.

(the linux 
ar rcs libdui.a ....
doesn't throw any warning because of the 'r' in rcs)

(thanks to J C Calvarese for finding this on DUI)

Ant
Oct 14 2003