diff --git a/kunit/src/main/kotlin/Test.kt b/kunit/src/main/kotlin/Test.kt index e094a0066fc..3789573874e 100644 --- a/kunit/src/main/kotlin/Test.kt +++ b/kunit/src/main/kotlin/Test.kt @@ -77,7 +77,7 @@ fun fails(block: ()-> Unit): Exception? { } /** Asserts that a block fails with a specific exception being thrown */ -fun failsWith(block: ()-> Any) { +fun failsWith(block: ()-> Unit) { try { block() Assert.fail("Expected an exception to be thrown")