Am 02.02.2012, 02:14 Uhr, schrieb Martin Nowak <[email protected]>:

On Thu, 02 Feb 2012 01:55:11 +0100, Vladimir Panteleev <[email protected]> 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:

a.d
----
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
https://github.com/D-Programming-Language/dmd/pull/669.

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?

Reply via email to