kyleg
01/03/2020, 7:11 AMBoolean
in your code because the function must always deal with Boolean no matter which type of Term?)
Assuming the pastebin contains the Output that only deals with Boolean, then why not
class Output<U: Term<V>, V>(val name: String) {
private val callbacks: MutableList<suspend (U) -> V> = mutableListOf()
// ...
}
and then have class Term
be class Term<V>
instead? I’m a relative neophyte with generics, though, so could be wrong. Plus I don’t have all your code, so maybe my suggestion doesn’t work anyway.bjonnh
01/03/2020, 5:43 PMkyleg
01/08/2020, 8:26 PMbjonnh
01/08/2020, 9:30 PM