title: scala value toInt is not a member of Any
body: <p>The println in the following code works (with or without <strong>toInt</strong>)</p>
  
  <pre><code>println("retweets : ", e.getOrElse("retweets", 0).toInt)
  
  top10Tweets(""+e.get("text").get, e.getOrElse("retweets", 0).toInt)
  </code></pre>
  
  <p>But when I pass it as an argument of a function (as above), it does not work. It says "value toInt is not a member of Any"</p>
  
  <p>When I remove toInt, it says, </p>
  
  <pre><code>    type mismatch;
  [error]  found   : Any
  [error]  required: Int
  </code></pre>
  
  <p>e is a Map, as follows,</p>
  
  <pre><code>  def tweetDetails(obj: twitter4j.Status) = {
     Map(
     "id" -&gt; obj.getUser().getId(),
     "screenName" -&gt; obj.getUser().getScreenName(),
     "text" -&gt; obj.getText(),
     "retweets" -&gt; obj.getRetweetCount(),
     "mentions" -&gt; obj.getUserMentionEntities().length)
    }
  </code></pre>
  
  <p>signature of top10Tweets,</p>
  
  <pre><code>def top10Tweets(tweets: String, retweet_c: Int, mention_c: Int) = {
  }
  </code></pre>