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 {
|
||||
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()
|
||||
|
||||
@@ -189,4 +189,8 @@ class SelfRef : GenBasic<SelfRef>()
|
||||
open class GenBasic<T>()
|
||||
|
||||
//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