www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14270] New: final interface: attribute is ignored

https://issues.dlang.org/show_bug.cgi?id=14270

          Issue ID: 14270
           Summary: final interface: attribute is ignored
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: rswhite4 gmail.com

This code works:
----
final interface Foo { }

class Bar : Foo { }
----

But it shouldn't. It seems that the final attribute is ignored.

So we have two choices:



Since this code works (to emulate C++ namespaces, I think):
---
final abstract class Quatz { }
----

and this is disallowed:
----
class Test : Quatz { }
----



--
Mar 10 2015