www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15390] New: 'abstract' should override final:


          Issue ID: 15390
           Summary: 'abstract' should override final:
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: turkeyman gmail.com

class X
  final: // <- naturally, this is the first line in any D class


  abstract void f(); // <- error, can't be abstract and final!

I think abstract should override final in this case, and not be an error...?

Without the ability to do this, you have to use final { ... }, and have little
blocks littered throughout classes, which is really unpleasant. That causes an
extra indentation level, making it hard to follow; class members look like
they're in a function because they're indented an extra level.

Nov 29 2015