www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23138] New: Overrides of member functions of an inherited


          Issue ID: 23138
           Summary: Overrides of member functions of an inherited class
                    ignores attribute "downcast"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: contact lsferreira.net

The following code compiles and shouldn't because it is illegal to lower the
 safe to  system on an override. The compiler doesn't lower, just ignores it,
but this makes the user confuse.

class C1 {
    void foo() pure nothrow  safe

class C2 : C1
    override void foo()  system
        // (()  system {})();

May 25 2022