D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6760 - Disallow disabled overrides
Summary: Disallow disabled overrides
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid
: 1449 5171 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-10-02 13:28 UTC by timon.gehr
Modified: 2017-08-07 13:15 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description timon.gehr 2011-10-02 13:28:24 UTC
class C{
    void foo(){}
}

class D: C{
    @disable override void foo(){} // should be a compile-time error             
}

Disabling an override does not make any sense and should be disallowed.
Comment 1 yebblies 2012-01-30 23:52:17 UTC
Same thing for deprecated overrides.
Comment 2 yebblies 2012-01-30 23:52:51 UTC
*** Issue 1449 has been marked as a duplicate of this issue. ***
Comment 3 basile-z 2017-02-25 18:26:46 UTC
*** Issue 5171 has been marked as a duplicate of this issue. ***
Comment 4 Walter Bright 2017-02-26 04:19:40 UTC
https://github.com/dlang/dmd/pull/6570
Comment 5 github-bugzilla 2017-02-26 04:21:05 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/9441e5a68bf473d7780bb2cab0c993f6819dc9ad
issue 6760 - deprecate `@disable` on overridden and deprecated functions

https://github.com/dlang/dmd/commit/6d8409d2f7502506044de9e62fde082aebf6ca29
Merge pull request #6570 from BBasile/issue-6760

issue 6760 - deprecate `@disable` on overridden and deprecated functions
Comment 6 Vladimir Panteleev 2017-07-02 17:56:28 UTC
6570 was merged, so this looks fixed.
Comment 7 github-bugzilla 2017-08-07 13:15:20 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/9441e5a68bf473d7780bb2cab0c993f6819dc9ad
issue 6760 - deprecate `@disable` on overridden and deprecated functions

https://github.com/dlang/dmd/commit/6d8409d2f7502506044de9e62fde082aebf6ca29
Merge pull request #6570 from BBasile/issue-6760