Errors - Re: Signals and Slots

Chris Miller chris at dprogramming.com
Thu Nov 2 15:42:13 PST 2006


On Thu, 02 Nov 2006 14:30:25 -0500, Walter Bright  
<newshound at digitalmars.com> 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;

Yuck. Did somebody say unprovoked import conflict? How about making all  
imports public! HOORAY



More information about the Digitalmars-d mailing list