KtPsiInconsistencyHandling¶
@RequiresOptIn
annotation class KtPsiInconsistencyHandling
Functions and classes annotated with KtPsiInconsistencyHandling are not intended for general-purpose use, but for working with possibly inconsistent PSI. The specific circumstances need to be described in the documentation of the annotated function/class.
Inconsistent PSI cannot be produced by the Kotlin parser. It occurs rarely, for example during modification of the PSI by the IDE. In general, it can be assumed that all PSI is consistent. Inconsistent PSI should only be assumed when there is sufficient proof.