Skip to content

Commit

Permalink
Improve error message when checking references
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomassetti committed Sep 15, 2024
1 parent 156f42b commit d071038
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ fun Node.assertReferencesResolved(forProperty: KReferenceByName<out Node>) {
fun Node.assertReferencesResolved(withReturnType: KClass<out PossiblyNamed> = PossiblyNamed::class) {
this.kReferenceByNameProperties(targetClass = withReturnType)
.mapNotNull { it.get(this) }
.forEach { assertTrue("Reference $it in node $this was expected to be solved") { (it as ReferenceByName<*>).resolved } }
.forEach { assertTrue("Reference $it in node $this at ${this.position} was expected to be solved") { (it as ReferenceByName<*>).resolved } }
this.walkChildren().forEach { it.assertReferencesResolved(withReturnType = withReturnType) }
}

Expand Down

0 comments on commit d071038

Please sign in to comment.