---
title: "hasAnyDescendant"
description: "Returns whether the node has at least one descendant that satisfies the given matcher.

 For the following tree

```
|-X
|-A |-B   |-C1   |-C2
```

In case of A, we would check the matcher against B,C1 and C2"
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun hasAnyDescendant(matcher: SemanticsMatcher): SemanticsMatcher
```


Returns whether the node has at least one descendant that satisfies the given matcher.

 For the following tree

```
|-X
|-A |-B   |-C1   |-C2
```

In case of A, we would check the matcher against B,C1 and C2



