"Redundant 'suspend' modifier": do not report when function has 'suspend' calls by parenthesized expression

#KT-24869 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-02-03 17:24:11 +09:00
committed by Mikhail Glukhikh
parent 31315e2c45
commit 4d1937b92d
3 changed files with 21 additions and 1 deletions
@@ -0,0 +1,14 @@
// PROBLEM: none
// WITH_RUNTIME
object Foo {
val f: suspend SequenceScope<Int>.(low: Int, high: Int) -> Unit = { low, high ->
(low until high).forEach {
yield(it)
}
}
}
<caret>suspend fun SequenceScope<Int>.f2(low: Int, high: Int) {
(Foo.f)(low, high)
}