title: Optional parameters and option types using F#
body: <p>Consider the following code:</p>
  
  <pre><code>type Test () =
    member o.fn1 (?bo) = 1
    member o.fn2 (?bo) = o.fn1 bo
  
    member o.fn3 (?bo) = 1 + bo.Value
    member o.fn4 (?bo) = o.fn3 bo
  </code></pre>
  
  <p>While <code>fn1</code> and <code>fn2</code> work just fine, <code>fn4</code> produces the following error:</p>
  
  <blockquote>
    <p>init.fsx(6,30): error FS0001: This expression was expected to have type int but here has type 'a option</p>
  </blockquote>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/dd233213.aspx#Y599" rel="noreferrer">MSDN</a> states:</p>
  
  <blockquote>
    <p>Optional parameters are interpreted as the F# option type, so you can query them in the regular way that option types are queried, by using a match expression with Some and None. </p>
  </blockquote>
  
  <p>To me, optional parameters are not interpreted as the F# option type otherwise the code would compile. Moreover I do not understand why, when I hover over <code>?bo</code> in <code>fn3</code> the tooltip says <code>val bo: int option</code> but from outside expects only <code>int</code>. I would expect a behavior of accepting nothing, int, Some int and None. And as the last note, I do not understand why <code>fn2</code> works but <code>fn4</code> does not.</p>
  
  <p>Thanks for clarification</p>