Errors - Re: Signals and Slots

Lars Ivar Igesund larsivar at igesund.net
Thu Nov 2 03:13:02 PST 2006


Chris Miller wrote:

> Using the example straight from
> http://www.digitalmars.com/d/phobos/std_signals.html (and yes using DMD
> 0.173) I get the following compiler errors:
> 
> 
> c:\dmd\bin\..\src\phobos\std\signals.d(166): undefined identifier
> _d_OutOfMemory
> 
> c:\dmd\bin\..\src\phobos\std\signals.d(166): function expected before (),
> not _d
> _OutOfMemory of type int
> c:\dmd\bin\..\src\phobos\std\signals.d(174): undefined identifier
> _d_OutOfMemory
> 
> c:\dmd\bin\..\src\phobos\std\signals.d(174): function expected before (),
> not _d
> _OutOfMemory of type int
> c:\dmd\bin\..\src\phobos\std\signals.d(235): undefined identifier free
> c:\dmd\bin\..\src\phobos\std\signals.d(235): function expected before (),
> not fr
> ee of type int
> 
> 
> 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. 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.

Maybe this is the que for Walter to finally accept that mixins are far from
perfect as they are? Buggy and not optimally designed.

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



More information about the Digitalmars-d mailing list