title: How do I write this member constraint in F#?
body: <p>For a type</p>
  
  <pre><code>type Cow() =
      class
          member this.Walk () = Console.WriteLine("The cow walks.")
      end
  </code></pre>
  
  <p>I can write a method which enforces a member constrain for method Walk like</p>
  
  <pre><code>let inline walk_the_creature creature =  
      (^a : (member Walk : unit -&gt; unit) creature)
  // and then do
  walk_the_creature (Cow())
  </code></pre>
  
  <p>In this case the type is inferred. I am unable to explicitly write a constraint on the creature parameter like this</p>
  
  <pre><code>// Does not compile
  // Lookup on object of indeterminate type based on information prior to this 
  // program point. A type annotation may be needed...
  let inline walk_the_creature_2 (creature:^a when ^a:(member Walk : unit -&gt; unit)) =
      creature.Walk()
  </code></pre>
  
  <p>What am I doing wrong?</p>