Is it possible to defer type member constraints to the usage site?
trait Query {
type Result
}
Pseudocode:
def fooRequiresAnyRefResults[Q <: Query, Q#Result <: AnyRef]()
I can't test it right now, but this should work :
def f[Q <: Query {type Result <: AnyRef}]() = ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With