mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Simplify KtTypeReference.isAnnotatedDeep
^KTIJ-21956 GitOrigin-RevId: cdd4050718adfb4c26473110cf96458ae0b889b7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2951230c7e
commit
7d85424f6a
@@ -425,14 +425,9 @@ fun ClassDescriptor.isRange(): Boolean {
|
||||
}
|
||||
|
||||
fun KtTypeReference.isAnnotatedDeep(): Boolean {
|
||||
fun List<KtTypeReference>.areAnnotatedDeep(): Boolean {
|
||||
for (type in this) {
|
||||
if (type.annotationEntries.isNotEmpty()) return true
|
||||
if (type.typeArguments().mapNotNull { it.typeReference }.areAnnotatedDeep()) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
return listOf(this).areAnnotatedDeep()
|
||||
if (annotationEntries.isNotEmpty()) return true
|
||||
if (typeArguments().any { it.typeReference?.isAnnotatedDeep() == true }) return true
|
||||
return false
|
||||
}
|
||||
|
||||
fun KtTypeReference?.typeArguments(): List<KtTypeProjection> {
|
||||
|
||||
Reference in New Issue
Block a user