overriding methods

stunaep via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 5 11:38:43 PDT 2016


I get a deprecation warning with @Override, but I was unable to 
find the proper way to do it.
Am I meant to add override before the method like this?
>override public void startThread(Thread t, int pri) {
>    ...
>}
Am I meant to wrap the entire method in override { } like this?
> override {
>    public void startThread(Thread t, int pri) {
>        ...
>    }
> }

Both of them compile, so I'm wondering which to use. Is override 
{} supposed to be for adding multiple methods inside to avoid 
writing override before each method, or is putting override in 
front of the method without brackets just wrong?



More information about the Digitalmars-d-learn mailing list