I have the following class defined,
class FixedLengthQueue[T<:Hashable](maxLength: Int) {
private val _outdated = ArrayBuffer.empty[T]
def outdated: Array[T] = {
val result = _outdated.toArray[T]
_outdated.clear()
result
}
}
However, at runtime, it reports error: No ClassTag available for T.
What is the syntax for defining a type as a ClassTag and using <: at the same time?