FIR: support CONDITION_TYPE_MISMATCH diagnostic

We report CONDITION_TYPE_MISMATCH on
- loop conditions
- when branch conditions
- binary logic arguments
This commit is contained in:
Mikhail Glukhikh
2021-05-18 13:26:27 +03:00
parent e85d97b894
commit 3663884db2
27 changed files with 165 additions and 50 deletions
@@ -56,7 +56,18 @@ object CommonExpressionCheckers : ExpressionCheckers() {
override val whenExpressionCheckers: Set<FirWhenExpressionChecker>
get() = setOf(
FirExhaustiveWhenChecker
FirExhaustiveWhenChecker,
FirWhenConditionChecker,
)
override val loopExpressionCheckers: Set<FirLoopExpressionChecker>
get() = setOf(
FirLoopConditionChecker,
)
override val logicExpressionCheckers: Set<FirLogicExpressionChecker>
get() = setOf(
FirLogicExpressionTypeChecker,
)
override val returnExpressionCheckers: Set<FirReturnExpressionChecker>