diff --git a/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt b/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt index f241196b72..fae4525c64 100644 --- a/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt +++ b/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt @@ -107,7 +107,7 @@ public suspend fun Flow.first(predicate: suspend (T) -> Boolean): T { true } } - if (result === NULL) throw NoSuchElementException("Expected at least one element matching the predicate $predicate") + if (result === NULL) throw NoSuchElementException("Expected at least one element matching the predicate") return result as T }