---
title: "hasParent"
description: "Returns whether the node's parent satisfies the given matcher.

Returns false if no parent exists."
type: "function"
---

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


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


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


Returns whether the node's parent satisfies the given matcher.

Returns false if no parent exists.



