I'm new to Scala, coming from a beginner Java background, so please bear with me.
I have a class, Arbitrage, with an abstract subclass Builder. I would like Arbitrage's type parameter to extend the abstract subclass.
Ex:
abstract class Arbitrage[T <: Builder[T]] {
// lots of code
abstract class Builder[T]{
// build pattern code
}
}
However this does not compile, and IntelliJ informs me that it "Cannot Resolve symbol "Builder". If I change the class signature to
class Arbitrage[T <: Ordered[T]]
then it compiles, so I'm fairly sure it's an issue with visibility.
Regards