New J2K: Fix converting recursive types
#KT-36088 fixed
This commit is contained in:
@@ -132,7 +132,10 @@ class JKTypeFactory(val symbolProvider: JKSymbolProvider) {
|
||||
|
||||
else -> JKClassType(
|
||||
symbolProvider.provideClassSymbol(type.getJetTypeFqName(false)),//TODO constructor fqName
|
||||
type.arguments.map { fromKotlinType(it.type) },
|
||||
type.arguments.map { typeArgument ->
|
||||
if (typeArgument.isStarProjection) JKStarProjectionTypeImpl
|
||||
else fromKotlinType(typeArgument.type)
|
||||
},
|
||||
if (type.isNullable()) Nullability.Nullable else Nullability.NotNull
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class TestClass<T : TestClass<T>>
|
||||
|
||||
class TestClass2 {
|
||||
fun test(testClass: TestClass<*>?) = Unit
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Unconvertable {
|
||||
public void cantConvertThis() {
|
||||
TestClass2 tester = new TestClass2();
|
||||
tester.test(null);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class Unconvertable {
|
||||
fun cantConvertThis() {
|
||||
val tester = TestClass2()
|
||||
tester.test(null)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user