title: F# 2d array index error
body: <p>The below code gives the error <code>The operator 'expr.[idx]' has been used an object of indeterminate type based on information prior to this program point. Consider adding further type constraints</code>. I think i have told it the type. What is wrong?</p>
  
  <pre><code>let board = Array2D.init 30 30 (fun x y -&gt; 0)
  
  let tickCell x y board : int[,]  =
      match board  with
      |board when board.[x].[y] = 0-&gt; 1
      |board when board.[x].[y] = 1-&gt; 0
      | _ -&gt; -1
  
  let board2 = Array2D.init 30 30 (fun x y -&gt; tickCell x y board)
  </code></pre>