December 22, 2013 Re: Updated DIP22 - Private symbol visibility | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Nowak | On 12/22/2013 08:48 PM, Martin Nowak wrote:
> On 12/22/2013 12:05 AM, Timon Gehr wrote:
>>>
>>
>> How is this going to work?
>
> Ah sorry, I misread your example.
> The call template function is in module a, so it has access too.
>
> > Are you arguing for creating multiple instances of 'call'?
>
> So this is indeed not necessary, the function is called within the
> template, so only the template scope determines whether a function is
> accessible.
Therefore none of the following two calls will work?
module a;
import b;
auto call(alias a){ a(0); }
void x(){
call!foo();
}
module b;
import a;
private auto foo(int x){ }
auto foo(double x){ }
void y(){
call!foo();
}
|
Copyright © 1999-2021 by the D Language Foundation