https://kotlinlang.org logo
#strikt
Title
d

dave08

10/05/2021, 1:59 PM
How's about something like this to help in asserting against sealed classes/interfaces children types (not too sure about the name though...), I seem to do this alot...:
Copy code
inline fun <reified T, R> Assertion.Builder<*>.getFromA(noinline function: T.() -> R): Assertion.Builder<R> =
        isA<T>().get(function.describe(), function)
c

christophsturm

10/05/2021, 3:20 PM
pretty cool!
3 Views