Recursive attribute for virtual functions?

12345swordy alexanderheistermann at gmail.com
Tue Mar 27 21:02:11 UTC 2018


On Tuesday, 27 March 2018 at 20:49:25 UTC, ag0aep6g wrote:
> On 03/27/2018 10:39 PM, 12345swordy wrote:
>> class A
>> {
>>      @recursive @safe void talk()
> [...]
>> }
>> class B : A
>> {
>>      override void talk() // @safe attribute added by 
>> recursive attribute and can not be removed
> [...]
>> }
>
> It already works like that. B.talk is @safe, and you can't make 
> it @system. You can mark it as @system, that gets overridden by 
> A.talk's @safe.
>
> https://run.dlang.io/is/BlH8bp
Then explain this then.
https://run.dlang.io/is/S2KLs5


More information about the Digitalmars-d mailing list