inline fun <T : Any> subAssert(noinline assertionCreator: Assert<T>.() -> Unit): Assert<T>.() -> Unit
(source)
Helper function to create an Assert<T> lambda with receiver; helps to circumvent Kotlin type inference bugs involving lambdas.
Following a few examples of bugs (you might want to vote if you encounter the same):
assertionCreator
- Your assertion creator lambda.
Return
your passed lambda.