www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Module is in multiple defined

Following the discussion of module declarations, there is still an
issue that dates back to 2005 and obviously has been ignored since
then. Consider this:

file 1: pack/module1.d
import pack.module2;

file 2: pack/module2.d
import pack.module1;

Compiling the above with 'dmd pack/module1 pack/module2' gives weird
messages like 'module module1 is in multiple defined'.

Adding explicit module declarations fixes the issue. It was discussed

This issue effectivly renders unnamed modules unusable.

May 13 2007