Access specifiers and visibility
Andrew Edwards via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 12 20:24:25 PDT 2017
On Thursday, 11 May 2017 at 04:35:22 UTC, Jesse Phillips wrote:
> 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.
That's not the same library but the exact same implementation.
The one I'm using (https://github.com/d-gamedev-team/dimgui)
borrows its from the deimos bindings.
So since the a struct cannot inherit from a class and vice versa,
then the entire approach taken by the library must be
reconsidered going forward. A little over my head at this point.
Thanks for the assist.
More information about the Digitalmars-d-learn
mailing list