Fix KotlinType building by IrType: don't miss type parameters of outer for inner class

#KT-25405 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-07-11 11:54:23 +02:00
parent 9c6452778f
commit 9cf9cb3ecd
7 changed files with 122 additions and 1 deletions
@@ -83,7 +83,7 @@ private fun makeKotlinType(
val kotlinTypeArguments = arguments.mapIndexed { index, it ->
when (it) {
is IrTypeProjection -> TypeProjectionImpl(it.variance, it.type.toKotlinType())
is IrStarProjection -> StarProjectionImpl((classifier.descriptor as ClassDescriptor).declaredTypeParameters[index])
is IrStarProjection -> StarProjectionImpl((classifier.descriptor as ClassDescriptor).typeConstructor.parameters[index])
else -> error(it)
}
}