title: scala: assign null to primitive
body: <p>I am trying to assign null to a variable which is Double like this:</p>
  
  <pre><code>var foo = 0.0
  foo = null
  </code></pre>
  
  <p>However, this gives an error that null cannot be implicitly converted to Double</p>
  
  <p>So I do this instead:</p>
  
  <pre><code>foo = null.asInstanceOf[Double]
  </code></pre>
  
  <p>however the new value for foo is 0.0</p>
  
  <p>How can I set the value to null?</p>