Don't require existence of the corresponding type argument during computing target type to apply type use annotation loaded from class file
^KT-46131 Fixed
This commit is contained in:
+1
-2
@@ -178,8 +178,7 @@ class BinaryJavaAnnotation private constructor(
|
|||||||
when (typePathKind) {
|
when (typePathKind) {
|
||||||
TypePath.TYPE_ARGUMENT -> {
|
TypePath.TYPE_ARGUMENT -> {
|
||||||
require(targetType is JavaClassifierType)
|
require(targetType is JavaClassifierType)
|
||||||
targetType.typeArguments[typeArgumentIndex]
|
targetType.typeArguments.getOrNull(typeArgumentIndex) // temporary fix for KT-46131
|
||||||
?: throw IllegalArgumentException("There must be no less than ${typeArgumentIndex + 1} type arguments")
|
|
||||||
}
|
}
|
||||||
TypePath.WILDCARD_BOUND -> {
|
TypePath.WILDCARD_BOUND -> {
|
||||||
require(targetType is JavaWildcardType)
|
require(targetType is JavaWildcardType)
|
||||||
|
|||||||
Reference in New Issue
Block a user