www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1973] New: static on interfaces should be an error

http://d.puremagic.com/issues/show_bug.cgi?id=1973

           Summary: static on interfaces should be an error
           Product: D
           Version: 1.028
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


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.


-- 
Apr 05 2008