次のScala2.9暗黙的変換メソッドを2.10暗黙的クラスに変換しようとしています。
import java.sql.ResultSet
/**
 * Implicitly convert a ResultSet to a Stream[ResultSet]. The Stream can then be
 * traversed using the usual map, filter, etc.
 *
 * @param row the Result to convert
 * @return a Stream wrapped around the ResultSet
 */
implicit def stream(row: ResultSet): Stream[ResultSet] = {
  if (row.next) Stream.cons(row, stream(row))
  else {
    row.close()
    Stream.empty
  }
}
私の最初の試みはコンパイルされません:
implicit class ResultSetStream(row: ResultSet) {
  def stream: Stream[ResultSet] = {
    if (row.next) Stream.cons(row, stream(row))
    else {
      row.close()
      Stream.empty
    }
  }
}
stream(row)パラメータを受け取らないため、構文エラーが発生しstreamます。
これを行う正しい方法は何ですか?