FIR: Support enhanced types when checking if Java type is primitive

This commit is contained in:
Denis.Zharkov
2021-08-16 18:12:51 +03:00
parent a0553f4dfd
commit 753ba99b04
15 changed files with 104 additions and 36 deletions
@@ -80,8 +80,7 @@ class JavaOverrideChecker internal constructor(
}
private fun ConeKotlinType.isPrimitiveInJava(): Boolean = with(context) {
// TODO: Support enhanced type like `@NotNull Integer` that are not nullable, but still aren't primitive
!isNullableType() && isPrimitiveOrNullablePrimitive
!isNullableType() && CompilerConeAttributes.EnhancedNullability !in attributes && isPrimitiveOrNullablePrimitive
}
private fun isEqualArrayElementTypeProjections(