Recursive attribute for virtual functions?
ag0aep6g
anonymous at example.com
Tue Mar 27 20:49:25 UTC 2018
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
More information about the Digitalmars-d
mailing list