.di files have implementation??

Nick Sabalausky a at a.a
Sat Oct 22 19:43:14 PDT 2011


I think I've misunderstood something about .di files:

$ cat testDI.d
private int foo(){ return 1; }
$ dmd -H -c testDI.d
$ cat testDI.di
// D import file generated from 'testDI.d'
private int foo()
{
return 1;
}

Why does the .di file include the body of foo? In fact, why does it have foo 
at all? I thought the point of .di files was they just have the public 
declarations, not the bodies and not the private stuff. Well, except for 
templates, obviously, but this isn't a template.

What's going on? What am I misunderstanding?




More information about the Digitalmars-d-learn mailing list