title: Error: Invalid override in ==
body: <p>The following error:</p>
  
  <pre><code>ERROR: Invalid override. The type of Bar.== ((Bar) → bool) is not a subtype of 
  Foo.== ((Foo) → bool). 
  </code></pre>
  
  <p>Occurs in line 10 of the following code (v1.15.0):</p>
  
  <pre><code>1  class Foo {
  2    int foo;
  
  3    Foo(this.foo);
  
  4    bool operator ==(Foo a) =&gt; foo == a.foo;
  5    int get hashCode =&gt; foo * 17;
  6  }
  
  7  class Bar extends Foo {
  8    int bar;
  
  8    Bar(int foo, this.bar) : super(foo);
  
  10   bool operator ==(Bar a) =&gt; (bar == a.bar) &amp;&amp; (foo == a.foo);
  11   int get hashCode =&gt; bar * (foo * 17);
  12 }
  </code></pre>
  
  <p>I have assumed that Bar is a subtype of Foo.  What is the problem with this code?</p>