robstoll01/02/2018, 12:08 PM
class A<T>(val a: B<T>.()->Unit)
But that failes stating that an extension function type cannot be used as upper bound. I want to be able to have the parameter nullable in some places and not nullable in others without creating two classes for it
class A<T1, T2: (B<T>.()->Unit)? >(val a: T2)
diesieben0701/02/2018, 12:10 PM
should work fine.
T2 : ((B<T>) -> Unit)?
robstoll01/02/2018, 12:11 PM
diesieben0701/02/2018, 12:12 PM
robstoll01/02/2018, 12:12 PM