Quick fix an infinite recursion with '*' under -Xobjc-generics
This commit is contained in:
committed by
SvyatoslavScherbina
parent
55452eab4d
commit
4787be95f5
+5
-1
@@ -816,7 +816,11 @@ internal class ObjCExportTranslatorImpl(
|
|||||||
} else {
|
} else {
|
||||||
val typeArgs = if (objcGenerics) {
|
val typeArgs = if (objcGenerics) {
|
||||||
kotlinType.arguments.map { typeProjection ->
|
kotlinType.arguments.map { typeProjection ->
|
||||||
mapReferenceTypeIgnoringNullability(typeProjection.type, objCExportScope)
|
if (typeProjection.isStarProjection) {
|
||||||
|
ObjCIdType // TODO: use Kotlin upper bound.
|
||||||
|
} else {
|
||||||
|
mapReferenceTypeIgnoringNullability(typeProjection.type, objCExportScope)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
emptyList()
|
emptyList()
|
||||||
|
|||||||
@@ -189,4 +189,8 @@ class SelfRef : GenBasic<SelfRef>()
|
|||||||
open class GenBasic<T>()
|
open class GenBasic<T>()
|
||||||
|
|
||||||
//Extensions
|
//Extensions
|
||||||
fun <T:Any> GenNonNull<T>.foo(): T = arg
|
fun <T:Any> GenNonNull<T>.foo(): T = arg
|
||||||
|
|
||||||
|
class StarProjectionInfiniteRecursion<T : StarProjectionInfiniteRecursion<T>>
|
||||||
|
|
||||||
|
fun testStarProjectionInfiniteRecursion(x: StarProjectionInfiniteRecursion<*>) {}
|
||||||
Reference in New Issue
Block a user