assert Mavericks Data Class Immutability
fun assertMavericksDataClassImmutability(kClass: KClass<*>, allowFunctions: Boolean = false)
Content copied to clipboard
Ensures that the state class is immutable. NOTE: Kotlin collections immutability is a compile-time check only and the underlying classes are mutable so it is impossible to detect them here. Kotlin mutability: https://stackoverflow.com/a/33732403/715633
As a result, you may not use MutableList, mutableListOf(...) or the map variants by convention only.