title: Why is F# erroring on this member override?
body: <p><strong>Context:</strong></p>
  
  <p>I am trying to create a couple classes to encapsulate SQL commands in way that fits better with functional programming than the standard <code>System.Data</code> classes.</p>
  
  <p>There are 3 main types of SQL commands that I care about,</p>
  
  <ul>
  <li>commands that return nothing</li>
  <li>commands that return 1 row</li>
  <li>commands that return many rows</li>
  </ul>
  
  <p>The implementation for how these must be executed is slightly different, but I want them to all share a common contract, which is why I am using class inheritance. I could also use an interface, but it doesn't seem like a big difference in this case.</p>
  
  <p>I have implemented the shared contract as this base class:</p>
  
  <pre><code>[&lt;AbstractClass&gt;]
  type ClosedCommand&lt;'a&gt;(text, kind, parameters) =
      inherit OpenCommand(text, kind, parameters)
  
      abstract member execute : cn:IDbConnection -&gt; 'a
  </code></pre>
  
  <p>And the 3 sub-classes as:</p>
  
  <pre><code>type UnitCommand(text, kind, parameters) =
      inherit ClosedCommand&lt;unit&gt;(text, kind, parameters)
  
      override x.execute cn =
          let cmd = x.toCommandDefinition null
          SqlMapper.Execute(cn, cmd) |&gt; ignore 
  
  type SingleCommand&lt;'a&gt;(text, kind, parameters) =
      inherit ClosedCommand&lt;'a&gt;(text, kind, parameters)
  
      override x.execute cn =
          let cmd = x.toCommandDefinition null
          SqlMapper.QuerySingle&lt;'a&gt;(cn, cmd)
  
  type PluralCommand&lt;'a&gt;(text, kind, parameters) =
      inherit ClosedCommand&lt;seq&lt;'a&gt;&gt;(text, kind, parameters)
  
      override x.execute cn =
          let cmd = x.toCommandDefinition null
          SqlMapper.Query&lt;'a&gt;(cn, cmd)
  </code></pre>
  
  <p>The core of the implementation is the <code>SqlMapper</code> class from the Dapper library.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>I am getting a compilation error on the subclass for commands returning nothing.  Here is a screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/lqgCH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lqgCH.png" alt="screenshot"></a></p>
  
  <p>The message is:</p>
  
  <p><em>The member <code>execute : IDbConnection -&gt; unit</code> does not have the correct type to override the corresponding abstract method.</em></p>
  
  <p>It looks to me like it does have the correct type. Even if I add type annotations, it still gives the same error.</p>
  
  <p>The only difference between this case and the other two is that it is binding <code>unit</code> to <code>'a</code>, whereas the other two leave it generic. That doesn't seem like it should matter.</p>
  
  <p><strong>Minimal example:</strong></p>
  
  <pre><code>[&lt;AbstractClass&gt;]
  type CommandBase&lt;'a&gt;(name) =
      member this.Name : string = name
      abstract member Execute : unit -&gt; 'a
  
  type UnitCommand(name) =
      inherit CommandBase&lt;unit&gt;(name)
      override this.Execute () = ()
  
  type SingleCommand&lt;'a&gt;(name, x) =
      inherit CommandBase&lt;'a&gt;(name)
      override this.Execute () = x 
  
  type MultipleCommand&lt;'a&gt;(name, xs) =
      inherit CommandBase&lt;seq&lt;'a&gt;&gt;(name)
      override this.Execute () = xs
  </code></pre>
  
  <p>How can I get this to compile?</p>