Thoughts about private aliases now working
Marco.Leise at gmx.de
Wed Feb 1 17:28:00 PST 2012
Am 02.02.2012, 02:14 Uhr, schrieb Martin Nowak <dawg at dawgfoto.de>:
> On Thu, 02 Feb 2012 01:55:11 +0100, Vladimir Panteleev
> <vladimir at thecybershadow.net> wrote:
>> On Wednesday, 1 February 2012 at 23:14:47 UTC, Robert Clipsham wrote:
>>> Are there any other options I'm missing?
> You need to put it in the mixin as you do with imports.
> mixin template Func()
> private alias string[string] SS;
> SS someFunc(SS s)
> return s;
>> How about this:
>>> private alias string[string] SS;
>>> mixin template Func()
>> private alias a.SS SS;
> You are still accessing a.SS from b so this won't work. It's a compiler
> bug and is fixed here
I thought mixin templates were _supposed_ to run in the scope of the call
site. Doesn't this mixin with the mixin blur the line and make the
language less consistent/more confusing?
More information about the Digitalmars-d