Fix losing flexible type enhancement in type substituting

It breaks `org.jetbrains.kotlin.nj2k.NewJavaToKotlinConverterSingleFileTestGenerated.ToArray#testToArray` test due to losing external nullability annotations
This commit is contained in:
Ilya Kirillov
2019-05-17 14:30:13 +03:00
parent 0a974cd419
commit fa8a067c85
@@ -36,7 +36,7 @@ interface NewTypeSubstitutor: TypeSubstitutorMarker {
KotlinTypeFactory.flexibleType( KotlinTypeFactory.flexibleType(
lowerBound?.lowerIfFlexible() ?: type.lowerBound, lowerBound?.lowerIfFlexible() ?: type.lowerBound,
upperBound?.upperIfFlexible() ?: type.upperBound upperBound?.upperIfFlexible() ?: type.upperBound
) ).inheritEnhancement(type)
} }
} }
} }