timon.gehr at gmx.ch
Tue Nov 29 10:59:09 PST 2011
On 11/28/2011 08:40 PM, Walter Bright wrote:
> On 11/28/2011 4:00 AM, Alexey Veselovsky wrote:
>> ok. I just removed from test.di all non public entities.
>> // D import file generated from 'test.d'
>> module test;
>> void foo();
>> struct Boo
>> void boo();
>> Now, let's build it:
>> $ dmd test.di test.d main.d
>> test.d: Error: module test from file test.d conflicts with another
>> module test from file test.di
>> di file not specification, but just another version of implementation?
> You cannot compile with both the di and d file.
>> Compiler doesn't know anything about "specification" files. So, he
>> did't check specification&implementation conformance.
> Yes, that's correct.
Actually the first part is not correct. The compiler knows about
interface files, and prefers those for imports in case the corresponding
.d file is not compiled with the same command (what makes sense).
More information about the Digitalmars-d