Relative Content

Tag Archive for kotlinlambdacontract

“Leaked in-place lambda” warning after an upgrade to Kotlin 2.0

Consider the following Kotlin code which overloads Reader.useLines(). The 1st extension merely invokes Reader.useLines() and has an exactly the same contract, the 2nd one filters the line sequence using some predicate and passes the filtered sequence to the consumer: