Fix enhancement behavior in case of error-typed upper bounds
This commit is contained in:
committed by
Victor Petukhov
parent
2964d52640
commit
c1b34a83e9
+1
@@ -428,6 +428,7 @@ class SignatureEnhancement(
|
||||
// Do not use bounds from Kotlin-defined type parameters
|
||||
if (this !is LazyJavaTypeParameterDescriptor) return null
|
||||
return when {
|
||||
upperBounds.all(KotlinType::isError) -> null
|
||||
upperBounds.all(KotlinType::isNullabilityFlexible) -> null
|
||||
upperBounds.any { !it.isNullable() } -> NullabilityQualifier.NOT_NULL
|
||||
else -> NullabilityQualifier.NULLABLE
|
||||
|
||||
Reference in New Issue
Block a user