[FIR] Never create ConeSubstitutorByMap with empty substitution
Relates to KT-66323
This commit is contained in:
committed by
Space Team
parent
6c691b497a
commit
624bea3ecf
+1
-1
@@ -80,7 +80,7 @@ object FirQualifiedAccessJavaNullabilityWarningChecker : FirQualifiedAccessExpre
|
||||
}
|
||||
}
|
||||
|
||||
return ConeSubstitutorByMap(substitutionMap, session)
|
||||
return ConeSubstitutorByMap.create(substitutionMap, session)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -279,7 +279,7 @@ fun findStaticallyKnownSubtype(
|
||||
|
||||
// At this point we have values for all type parameters of List
|
||||
// Let's make a type by substituting them: List<T> -> List<Foo>
|
||||
val substitutor = ConeSubstitutorByMap(resultSubstitution, session)
|
||||
val substitutor = ConeSubstitutorByMap.create(resultSubstitution, session)
|
||||
return substitutor.substituteOrSelf(subtypeWithVariablesType)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ private fun buildDeepSubstitutionMultimap(
|
||||
for (index in 0 until count) {
|
||||
val typeArgument = typeArguments[index]
|
||||
|
||||
val substitutedArgument = ConeSubstitutorByMap(substitution, session)
|
||||
val substitutedArgument = ConeSubstitutorByMap.create(substitution, session)
|
||||
.substituteArgument(typeArgument, index)
|
||||
?: typeArgument
|
||||
val substitutedType = substitutedArgument.type ?: continue
|
||||
|
||||
Reference in New Issue
Block a user