FIR: Use flexible type for generic parameters bounds

Otherwise star projections may be incorrectly approximated to strictly
nullable types (as in test)
This commit is contained in:
Denis Zharkov
2020-02-11 14:08:35 +03:00
parent 5a2cdfcab4
commit bc34bc3f96
5 changed files with 30 additions and 1 deletions
@@ -92,7 +92,7 @@ class JavaSymbolProvider(
stack: JavaTypeParameterStack,
) {
for (upperBound in javaTypeParameter.upperBounds) {
bounds += upperBound.toFirResolvedTypeRef(this@JavaSymbolProvider.session, stack, nullability = ConeNullability.NULLABLE)
bounds += upperBound.toFirResolvedTypeRef(this@JavaSymbolProvider.session, stack, nullability = ConeNullability.UNKNOWN)
}
addDefaultBoundIfNecessary()
}