Can't pass private symbols as alias parameter

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 16 19:11:04 PST 2014


On Sunday, 16 November 2014 at 10:41:20 UTC, deadalnix wrote:
> module a;
>
> struct A(alias foo) {
>     auto foo() {
>         return foo();
>     }
> }
>
> module b;
>
> import a;
>
> void main() {
>     auto a = A!bar();
> }
>
> private int bar() { return 42; }
>
> This do not work. I think it is a bug but I see how could see 
> it as a feature. Which one is it ?

Why would that be a feature?


More information about the Digitalmars-d mailing list