Swift 3, Xcode 8β2.
I've implemented a class that sorts Comparable data and attempted to test it using Doubles. Unfortunately, I'm getting the error "Cannot convert value of type '[Double]' to specified type '[T]'."
. I've reproduced the error in the sample code below:
class foo<T: Comparable> {
let data: [T] = [Double]()
}
Am I right is assuming that Doubles are Comparable and, if so, how do I eliminate the error above?
Thx.