Skip to content

Commit

Permalink
Handle empty array in annotation arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ting-yuan committed Oct 18, 2024
1 parent 8e8e8c3 commit 99d3859
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ private fun KaAnnotated.annotationsWithRepeatableUnfolded(): List<KaAnnotation>
(it as? KaAnnotationValue.NestedAnnotationValue)?.annotation ?: return@flatMap listOf(container)
}
val containedAnnotationClassId: ClassId =
containedAnnotations?.first()?.classId ?: return@flatMap listOf(container)
containedAnnotations?.firstOrNull()?.classId ?: return@flatMap listOf(container)
val containedClass = containedAnnotationClassId.toKtClassSymbol() ?: return@flatMap listOf(container)
if (containedClass.isRepeatableAnnotation(container)) {
containedAnnotations
Expand Down

0 comments on commit 99d3859

Please sign in to comment.