Get rid of trivial allowFlexible replacing
As the type is anyway replaced with not-nullable version explicitly, the only thing that changes is what type is loaded for String[][].class: - before it would be Array<Array<String?>?> - now it's Array<(out) Array<(out) String!>!> It's both a minor change and new behaviour can be considered as correct
This commit is contained in:
+1
-1
@@ -5,6 +5,6 @@ public class ClassObjectArrayInParam {
|
|||||||
Class<?>[] value();
|
Class<?>[] value();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Anno({ClassObjectArrayInParam.class, Nested.class, String.class})
|
@Anno({ClassObjectArrayInParam.class, Nested.class, String.class, java.util.List.class, String[][].class, int[][].class})
|
||||||
public static class Nested {}
|
public static class Nested {}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ public open class ClassObjectArrayInParam {
|
|||||||
public final val value: kotlin.Array<kotlin.reflect.KClass<*>>
|
public final val value: kotlin.Array<kotlin.reflect.KClass<*>>
|
||||||
}
|
}
|
||||||
|
|
||||||
@test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam::class, test.ClassObjectArrayInParam.Nested::class, kotlin.String::class}) public open class Nested {
|
@test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam::class, test.ClassObjectArrayInParam.Nested::class, kotlin.String::class, kotlin.collections.(Mutable)List<(raw) kotlin.Any?>::class, kotlin.Array<(out) kotlin.Array<(out) kotlin.String!>!>::class, kotlin.Array<(out) kotlin.IntArray!>::class}) public open class Nested {
|
||||||
public constructor Nested()
|
public constructor Nested()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -132,7 +132,7 @@ class LazyJavaAnnotationDescriptor(
|
|||||||
// Class type is never nullable in 'Foo.class' in Java
|
// Class type is never nullable in 'Foo.class' in Java
|
||||||
val type = TypeUtils.makeNotNullable(c.typeResolver.transformJavaType(
|
val type = TypeUtils.makeNotNullable(c.typeResolver.transformJavaType(
|
||||||
javaType,
|
javaType,
|
||||||
TypeUsage.COMMON.toAttributes(allowFlexible = false))
|
TypeUsage.COMMON.toAttributes())
|
||||||
)
|
)
|
||||||
|
|
||||||
val jlClass = c.module.resolveTopLevelClass(FqName("java.lang.Class"), NoLookupLocation.FOR_NON_TRACKED_SCOPE) ?: return null
|
val jlClass = c.module.resolveTopLevelClass(FqName("java.lang.Class"), NoLookupLocation.FOR_NON_TRACKED_SCOPE) ?: return null
|
||||||
|
|||||||
Reference in New Issue
Block a user