Deprecate precondition checks with non-lazy message.
Make precondition checks with lazy message inline. Use require with lazy message in stdlib. #KT-8253 Fixed
This commit is contained in:
@@ -108,7 +108,7 @@ fun filtering(): List<GenericFunction> {
|
||||
|
||||
body(ArraysOfObjects, ArraysOfPrimitives) {
|
||||
"""
|
||||
require(n >= 0, "Requested element count $n is less than zero.")
|
||||
require(n >= 0) { "Requested element count $n is less than zero." }
|
||||
if (n == 0) return emptyList()
|
||||
if (n >= size()) return toList()
|
||||
var count = 0
|
||||
|
||||
Reference in New Issue
Block a user