title: Scala compiler cannot determine which overloaded method to invoke
body: <p>I'm trying to call one of the overloaded query() methods in Spring 3.0's JdbcTemplate class in Scala...</p>
  
  <pre><code>val args: Array[Object] = new Array[Object](1)
  args(0) = id
  val results: List[MyObj] = jdbcTemplate.query(SQL_STRING, args, new MyJdbcStore.MyObjRowMapper)
  </code></pre>
  
  <p>...and I get a stack trace that says, "overloaded method value query with alternatives."  (The MyObjRowMapper in the above code snippet is a class, defined in MyJdbcStore's companion object, that extends Spring's RowMapper interface.)  The "alternatives" are the three versions of query() that have these parameters respectively:</p>
  
  <pre><code>java.lang.String, Array[java.lang.Object], org.springframework.jdbc.core.ResultSetExtractor
  java.lang.String, org.springframework.jdbc.core.PreparedStatementSetter, org.springframework.jdbc.core.ResultSet
  org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.PreparedStatementSetter, org.springframework.jdbc.core.ResultSetExtractor
  </code></pre>
  
  <p>Even though I've explictly defined the return type of the results variable, why can't the compiler determine which query method to call?</p>