module import rules

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 25 13:03:39 PST 2015


The module declaration at the top of the file is needed and must 
match the import.

So in somepackage/somemodule.d, add at the top

module somepackage.somemodule;


and then it will all work. While the module declaration is 
technically optional, any file that is imported really should 
have it every time.


More information about the Digitalmars-d-learn mailing list