[Issue 13155] New: Disallow final abstract classes
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 18 03:50:12 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13155
Issue ID: 13155
Summary: Disallow final abstract classes
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: verylonglogin.reg at gmail.com
This code should NOT compile:
---
final abstract class C { }
---
Such classes are almost useless and generally indicate an error. Note unless
enhancement Issue 2946 is fixed the class may be derived as `abstract`:
---
final class C: B { }
---
`C` may or may no be `abstract` here depending on `B`. And one have to look
through every ancestor of `C` to determine whether it contains an unimplemented
`abstract` method.
--
More information about the Digitalmars-d-bugs
mailing list