April 08, 2016
On 4/7/16 11:55 AM, Steven Schveighoffer wrote:
> Please file a bug report, not sure why this happened.


I filed it for you:

https://issues.dlang.org/show_bug.cgi?id=15897

-Steve

April 08, 2016

Dne 8.4.2016 v 14:56 Steven Schveighoffer via Digitalmars-d-learn napsal(a):
> On 4/8/16 2:08 AM, 9il wrote:
>> On Thursday, 7 April 2016 at 15:55:16 UTC, Steven Schveighoffer wrote:
>>> On 4/6/16 11:10 AM, Andre wrote:
>>>> [...]
>>>
>>> Just FYI, you don't need a semicolon there.
>>>
>>>>>> [...]
>>>
>>> Wow, totally agree with you. Compiler shouldn't make you jump through
>>> this hoop:
>>>
>>> void foo(Cat cat)
>>> {
>>>    Animal a = cat;
>>>    a.create();
>>> }
>>>
>>> Please file a bug report, not sure why this happened.
>>>
>>
>> Why this is a bug? private methods are not virtual, are they? --Ilya
>
> A Cat is an Animal. The compiler knows this. The 'a' module has access to Animal private methods.
>
> This isn't a virtual call, but a call to a base class member. Those are allowed. How can you think this is not a bug?
>
> Would you think it was a bug if create was a final function instead of private? This is exactly the same thing.
>
> -Steve

Yes ou are right, I see it now :), thanks.
1 2
Next ›   Last »