[Issue 10768] New: DMD does not show deprecation message for missing 'override' keyword

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 6 21:33:33 PDT 2013


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

           Summary: DMD does not show deprecation message for missing
                    'override' keyword
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-08-06 21:33:32 PDT ---
This is a spin-off issue from:
http://d.puremagic.com/issues/show_bug.cgi?id=10727#c3

----

DMD does not crib about
missing override for function Foo.frop. But starts doing that if "alias toArray
this" in CirBuff(T) is commented out.

struct CirBuff(T) {
  import std.traits: isArray;
  CirBuff!T opAssign(R)(R ) if(isArray!R) { }

  T[] toArray() {
    T[] ret; //  = new T[this.length];
    return ret;
  }
  alias toArray this;
}

class Bar (T=int){
  CirBuff!T _bar;
}

class Once {
  Bar!Foo _foobar;
}

class Foo: Frop {
  // override
  public int frop() {return 1;}
}

class Frop {
  public int frop() {return 0;}
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list