www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13155] New: Disallow final abstract classes


          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 puremagic.com
          Reporter: verylonglogin.reg 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.

Jul 18 2014