Access specifiers and visibility

Jesse Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 10 21:35:22 PDT 2017


On Wednesday, 10 May 2017 at 13:29:40 UTC, Andrew Edwards wrote:
> On Wednesday, 10 May 2017 at 13:13:46 UTC, Jesse Phillips wrote:
>> On Wednesday, 10 May 2017 at 01:42:47 UTC, Andrew Edwards 
>> wrote:
>>> Attempting to update a git repo to current D, I encounter the 
>>> following deprecation messages:
>>>
>>> src/glwtf/signals.d-mixin-256(256,2): Deprecation: 
>>> glwtf.input.BaseGLFWEventHandler._on_key_down is not visible 
>>> from module glwtf.signals
>>>
>>> Thanks,
>>> Andrew
>>
>> This comes from:
>> http://dlang.org/changelog/2.071.0.html#dip22
>>
>> The module glwtf.signals needs to import glwtf.input. One of 
>> the other imports was contaminating the namespace.
>
> I actually attempted solve the issue with selective import as 
> such::
>
>     import glwtf.input : BaseGLFWEventHandler;
>
> but it did not work. Importing the entire module does not work 
> either.

I'm not sure the library you're using but this like the one:
https://github.com/Dav1dde/glwtf/blob/master/glwtf/input.d#L163

This code says that the function is protected.

https://github.com/Dav1dde/glwtf/blob/master/glwtf/signals.d#L254

This line is probably mixing in a call to that function into a 
struct

https://github.com/Dav1dde/glwtf/blob/master/glwtf/signals.d#L229

But that struct doesn't inherit from the class so it can't access 
protected fields.


More information about the Digitalmars-d-learn mailing list