diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt index 5a107be7111..80320e0865b 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportHeaderGenerator.kt @@ -816,7 +816,11 @@ internal class ObjCExportTranslatorImpl( } else { val typeArgs = if (objcGenerics) { kotlinType.arguments.map { typeProjection -> - mapReferenceTypeIgnoringNullability(typeProjection.type, objCExportScope) + if (typeProjection.isStarProjection) { + ObjCIdType // TODO: use Kotlin upper bound. + } else { + mapReferenceTypeIgnoringNullability(typeProjection.type, objCExportScope) + } } } else { emptyList() diff --git a/backend.native/tests/framework/values_generics/values_generics.kt b/backend.native/tests/framework/values_generics/values_generics.kt index aa9948038e6..58c0f1be3a3 100644 --- a/backend.native/tests/framework/values_generics/values_generics.kt +++ b/backend.native/tests/framework/values_generics/values_generics.kt @@ -189,4 +189,8 @@ class SelfRef : GenBasic() open class GenBasic() //Extensions -fun GenNonNull.foo(): T = arg \ No newline at end of file +fun GenNonNull.foo(): T = arg + +class StarProjectionInfiniteRecursion> + +fun testStarProjectionInfiniteRecursion(x: StarProjectionInfiniteRecursion<*>) {} \ No newline at end of file