Errors - Re: Signals and Slots

Lars Ivar Igesund larsivar at igesund.net
Fri Nov 3 01:10:46 PST 2006


Walter Bright wrote:

> Chris Miller wrote:
>> I think this is finally a real mixin limitation being exposed. You
>> probably only tested std.signals inside the signals.d source file, where
>> the mixin had access to std.signals' imports.
> 
> I plead guilty. My test suite is now corrected.
> 
>> But use std.signals from
>> another file and the mixin cannot access std.signal's imports because
>> it's accessing the mixed-in scope. In other words, I think to remove
>> these errors, std.signals' imports would need to be imported inside the
>> mixin template (hack?), or change how mixins work.
> 
> The fix is straightforward, in std\signals.d just make the imports public:
> 
>> public import std.stdio;
>> public import std.c.stdlib;
>> public import std.outofmemory;

There were some reasons for keeping imports private, you know. I believe
there were some discussions too ;)

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi



More information about the Digitalmars-d mailing list