Skip to content

Commit

Permalink
fixed NoSuchElementException: List is empty in annotatedDelegationSpe…
Browse files Browse the repository at this point in the history
…cifier
  • Loading branch information
drieks committed Oct 21, 2019
1 parent 1614fd8 commit 19aa8cd
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,16 @@ val declarationsMapper: TreeMapMapper = TreeMapMapper()
}.map("annotatedDelegationSpecifier") { node: AstNode ->
treeMap(node.children).map { summary ->
val identifier = summary.filterIsInstance<KlassIdentifier>()
TreeMapResult.Continue(
KlassInheritance(
type = identifier.first(),
annotations = summary.filterIsInstance<KlassAnnotation>()
if (identifier.size == 1) {
TreeMapResult.Continue(
KlassInheritance(
type = identifier.first(),
annotations = summary.filterIsInstance<KlassAnnotation>()
)
)
)
} else {
TreeMapResult.Continue(summary)
}
}
}.map("typeParameter") { node: AstNode ->
treeMap(node.children).map { summary ->
Expand Down

0 comments on commit 19aa8cd

Please sign in to comment.