Why is it not possible to use lateinit
with Boolean
in Kotlin? I tried it with the other primitive data types and it works fine!
Here is the code that I want to use:
object BankAccount {
lateinit var accountName: String
lateinit var accountNumber: String
lateinit var accountStatus : Boolean
}
This is what the error says:
'lateinit' modifier is not allowed on properties of primitive types