D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13156 - `abstract` attribute should be disallowed in `interface`s
Summary: `abstract` attribute should be disallowed in `interface`s
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2014-07-18 11:13 UTC by Denis Shelomovskii
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2014-07-18 11:13:19 UTC
`abstract` attribute should be disallowed in `interface`s in any way as it does nothing except confuses people.

This code should NOT compile:
---
interface I
{
    abstract void f();      // should be error
    abstract { void g(); }  // should be error
    abstract: void h();     // should be error
}
---
Comment 1 basile-z 2017-03-08 14:03:36 UTC
interface I{void a();}
static assert(__traits(isAbstractFunction, I.a));