D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1973 - static on interfaces should be an error
Summary: static on interfaces should be an error
Status: RESOLVED DUPLICATE of issue 2553
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2008-04-05 11:19 UTC by Frank Benoit
Modified: 2015-06-09 05:11 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 Frank Benoit 2008-04-05 11:19:08 UTC
static interface Name{
}

makes all member functions to be static member functions without implementation. This will create linker errors and does not make sense. Or do i miss something?

On the other hand, in Java, all nested interfaces are implicit static and it is optional to list the static keyword.

To avoid problems here, the compiler could give an error if D source code has the static keyword in an interface declaration.
Comment 1 yebblies 2012-01-30 18:41:52 UTC
Static no longer propagates to the interface members.  Asking for an error on this is a dup of issue 3934.

*** This issue has been marked as a duplicate of issue 2553 ***