[K/JS] Save nullability from the original type of value parameters ^KT-63013 Fixed

This commit is contained in:
Artem Kobzar
2023-11-14 10:40:07 +00:00
committed by Space Team
parent 83c90d0e4f
commit bec434d534
6 changed files with 36 additions and 1 deletions
@@ -763,7 +763,7 @@ class FunctionInlining(
// in case of recursive call, we can get a situation there the same type parameter will be mapped on different type arguments.
// (see compiler/testData/codegen/boxInline/complex/use.kt test file)
val newTypeParameter = copy.typeParameters[typeClassifier.index].defaultType.substituteSuperTypes()
return if (useTypeParameterUpperBound) typeClassifier.firstRealUpperBound() else newTypeParameter
return if (useTypeParameterUpperBound) typeClassifier.firstRealUpperBound().mergeNullability(type) else newTypeParameter
}
return when (this) {