From d071038174bdf902be492096008f18cc2cb9eb1e Mon Sep 17 00:00:00 2001 From: ftomassetti Date: Sun, 15 Sep 2024 12:41:12 +0200 Subject: [PATCH] Improve error message when checking references --- core/src/main/kotlin/com/strumenta/kolasu/testing/Testing.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/com/strumenta/kolasu/testing/Testing.kt b/core/src/main/kotlin/com/strumenta/kolasu/testing/Testing.kt index 2dcc6324..2de934b7 100644 --- a/core/src/main/kotlin/com/strumenta/kolasu/testing/Testing.kt +++ b/core/src/main/kotlin/com/strumenta/kolasu/testing/Testing.kt @@ -271,7 +271,7 @@ fun Node.assertReferencesResolved(forProperty: KReferenceByName) { fun Node.assertReferencesResolved(withReturnType: KClass = 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) } }