override and interface methods

Andrea Fontana nospam at example.com
Mon Oct 29 13:44:03 UTC 2018


On Monday, 29 October 2018 at 13:14:28 UTC, FeepingCreature wrote:
> When overriding a class method, you are required to specify 
> `override`, indicating you are redefining existing behavior.
>
> When implementing an interface method, override *can* be used 
> but doesn't *have to* be used. This seems quite ambiguous and 
> confusing. Am I overriding a method here? If yes, I should be 
> required to use it. If not, I should not be *allowed* to use it.
>
> Thoughts?

In this case you have just one choice:
https://run.dlang.io/is/4zWNED

Andrea


More information about the Digitalmars-d mailing list