Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.fir.kt
T
2021-12-02 20:24:14 +03:00

11 lines
340 B
Kotlin
Vendored

// WITH_RUNTIME
fun List<Int>.decimateEveryEvenThird() = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>sequence<!> {
var counter = 1
for (e in <!ITERATOR_AMBIGUITY!>this<!UNRESOLVED_LABEL!>@List<!><!>) {
if (e <!NONE_APPLICABLE!>%<!> 2 == 0 && counter % 3 == 0) {
yield(e)
}
counter += 1
}
}