strange with alias this and import

aquaratixc disconnectix at gmail.com
Fri Jan 31 21:51:55 UTC 2020


On Friday, 31 January 2020 at 21:16:07 UTC, Steven Schveighoffer 
wrote:
> On 1/31/20 3:55 PM, aquaratixc wrote:
>
>> How to fix this ?
>> 
>
> _image is protected, so you can only use the alias-this inside 
> the type itself, or its derivatives.
>
> If you want to expose access, but not allow rebinding, create a 
> public accessor:
>
> final AnyMapImage image() { return _image; }
> alias image this;
>
> Now, your other module can see the symbol.
>
> -Steve

Thanks


More information about the Digitalmars-d mailing list