title: Type mismatch error in initialization of Scala map (string to object)
body: <p>I need to setup a Scala Map that maps from String to an object (string, integer, floating point number)</p>
  
  <p>I tried this code:</p>
  
  <pre><code>val m = Map[String, Object]("A"-&gt;10, "B"-&gt;20.5)
  </code></pre>
  
  <p>to get type mismatch error. </p>
  
  <p><img src="https://i.stack.imgur.com/SstEf.png" alt="enter image description here"></p>
  
  <p>What could be the solution to this issue?</p>