FIR: add minor TODO / comments to mismatch checkers
This commit is contained in:
+2
@@ -36,9 +36,11 @@ object FirInitializerTypeMismatchChecker : FirPropertyChecker() {
|
||||
expressionType.nullability == ConeNullability.NOT_NULL
|
||||
) {
|
||||
// val p: Byte = 42 or similar situation
|
||||
// TODO: remove after fix of KT-46047
|
||||
return
|
||||
}
|
||||
if (propertyType.isExtensionFunctionType || expressionType.isExtensionFunctionType) {
|
||||
// TODO: remove after fix of KT-45989
|
||||
return
|
||||
}
|
||||
reporter.report(INITIALIZER_TYPE_MISMATCH.on(source, propertyType, expressionType), context)
|
||||
|
||||
+1
@@ -24,6 +24,7 @@ object FirFunctionReturnTypeMismatchChecker : FirReturnExpressionChecker() {
|
||||
val targetElement = expression.target.labeledElement
|
||||
if (targetElement !is FirSimpleFunction) return
|
||||
val resultExpression = expression.result
|
||||
// To avoid duplications with NO_ELSE_IN_WHEN or INVALID_IF_AS_EXPRESSION
|
||||
if (resultExpression is FirWhenExpression && !resultExpression.isExhaustive) return
|
||||
|
||||
val functionReturnType = targetElement.returnTypeRef.coneType
|
||||
|
||||
Reference in New Issue
Block a user