KT-6698 Bad class file when using a star-projection on a Java's recursive generic parameter

#KT-6698 Fixed
This commit is contained in:
Andrey Breslav
2015-01-30 18:49:30 +03:00
parent 8d5a6d729e
commit da639039bd
61 changed files with 996 additions and 847 deletions
@@ -91,9 +91,12 @@ class LazyJavaTypeResolver(
val typeParameter: TypeParameterDescriptor,
val attr: JavaTypeAttributes
) : TypeProjectionBase() {
override fun isStarProjection() = true
override fun getProjectionKind() =
// projections are not allowed in immediate arguments of supertypes
if (typeParameter.getVariance() == OUT_VARIANCE || attr.howThisTypeIsUsed == SUPERTYPE) INVARIANT else OUT_VARIANCE
override fun getType() = typeParameter.getUpperBoundsAsType()
}