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

          Issue ID: 17354
           Summary: An overload in a final class can silently hide base
                    methods
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: b2.t...@gmx.com

Try this:


  final class Foo
  {
    bool opEquals(const Object) const {return true;}
  }

  void main(){}

Then this:

  class Foo
  {
    bool opEquals(const Object) const {return true;}
  }

  void main(){}


In the first case the hijacking is detected. in the second, everything compiles
finely. This is why jenkins test failed here:
https://github.com/dlang/dmd/pull/6731#issuecomment-297327652

--

Reply via email to