How i can tell Kotlin’s compiler what I do not want him to check lateinit property and throw exception if they not initialized?
You cannot because that would break type safety. If you need something that is optional, simply use a nullable type:
private var optionalSomething: Type? = null
1 Like
You can intercept UninitializedPropertyAccessException
with try-catch
block