title: Structured typing in Scala doesn't work with Double?
body: <p>I'm trying to do the following code:</p>
  
  <pre><code>def sum(e: { def *(x: Double): Double}) = e * 2.0
  </code></pre>
  
  <p>Problem is, this doesn't work with any numeric classes:</p>
  
  <pre><code>sum(20.0)
  &lt;console&gt;:9: error: type mismatch;
   found   : Double(10.0)
   required: AnyRef{def *(x: Double): Double}
                algo(10.0)
  
  sum(10)
  &lt;console&gt;:9: error: type mismatch;
   found   : Int(10)
   required: AnyRef{def *(x: Double): Double}
                algo(10)
  </code></pre>
  
  <p>Is there something wrong with my code?</p>