Inference for some kind of self types

This commit is contained in:
Mikhail Zarechenskiy
2021-06-18 02:50:22 +03:00
committed by Victor Petukhov
parent db72fd1e93
commit 44cf4be1e5
15 changed files with 273 additions and 16 deletions
@@ -84,7 +84,7 @@ public class DescriptorSubstitutor {
for (TypeParameterDescriptor descriptor : typeParameters) {
TypeParameterDescriptorImpl substituted = substitutedMap.get(descriptor);
for (KotlinType upperBound : descriptor.getUpperBounds()) {
KotlinType substitutedBound = substitutor.substitute(upperBound, Variance.IN_VARIANCE);
KotlinType substitutedBound = substitutor.substitute(upperBound, Variance.OUT_VARIANCE);
if (substitutedBound == null) return null;
if (substitutedBound != upperBound && wereChanges != null) {