Oh and add a version with a function to generate the message:
inline operator fun AssertionsEnabled?.invoke(message:() -> String, assertion: () -> Boolean)
{
this?.run { assert(assertion(), message) }
}
Oh and add a version with a function to generate the message:
inline operator fun AssertionsEnabled?.invoke(message:() -> String, assertion: () -> Boolean)
{
this?.run { assert(assertion(), message) }
}