FE: avoid stack overflow on star projection of enhanced type parameter

#KT-47846 Fixed
This commit is contained in:
pyos
2021-07-22 12:30:36 +02:00
committed by Victor Petukhov
parent ed44497a9b
commit d00fba3718
6 changed files with 59 additions and 0 deletions
@@ -186,6 +186,7 @@ public class TypeSubstitutor implements TypeSubstitutorMarker {
typeParameter,
recursionDepth + 1
);
if (substitution.isStarProjection()) return substitution;
KotlinType substitutedEnhancement = substitute(enhancement, originalProjection.getProjectionKind());
KotlinType resultingType = TypeWithEnhancementKt.wrapEnhancement(