import and module names question

Ary Borenszweig ary at esperanto.org.ar
Sat Jan 12 18:45:59 PST 2008


I'm currently testing the semantic analysis of Descent, to match it with 
DMD's. I'm trying to get zero errors on phobos. There's one thing I 
don't understand. In module internal.gc.gc there's this line:

public import gcx;

At the root of phobos there is no file named gcx.d, but in internal/gc/ 
there is one. That file doesn't have a module declaration (no "module 
...;"). So I thought "Oh, since it doesn't have a module declaration, 
the module's name is gcx (the filename minus .d), and that's why the 
public import works". But... When compiling this piece of code:

---
import internal.gc.gc;
---

I get:
..\dmd\bin\..\src\phobos\internal\gc\gc.d(37): module gcx cannot read 
file 'gcx.d'

So... is there an error in internal.gc.gc? If so... how does phobos gets 
compiled? Should I ignore that kind of errors while testing Descent on 
phobos?


More information about the Digitalmars-d-learn mailing list