November 29, 2015 [Issue 15390] New: 'abstract' should override final: | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=15390 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. -- |
Copyright © 1999-2021 by the D Language Foundation