def foo[T <% Ordered[T]](array: Array[T], x: T) = {
........
}
So with foo I would like it to take in both Array and ArrayBuffer. However when I try and pass an ArrayBuffer, I get a type mistmatch
main.scala:67: error: type mismatch;
found : scala.collection.mutable.ArrayBuffer[Int]
I could simply solve this by making the array parameter an ArrayBuffer instead of an Array but that makes my method less flexible.