[FIR] Fix false positive "suspension point is inside a critical section"
^KT-55072 Fixed
This commit is contained in:
committed by
Space Team
parent
30c00f7983
commit
d8ccf21894
@@ -0,0 +1,29 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-55072
|
||||
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
import kotlin.concurrent.withLock
|
||||
|
||||
class Player
|
||||
{
|
||||
fun play() {
|
||||
ReentrantLock().withLock {
|
||||
launch {
|
||||
pumpEvents()
|
||||
}
|
||||
suspend fun launch2() {
|
||||
pumpEvents()
|
||||
}
|
||||
suspend {
|
||||
pumpEvents()
|
||||
}
|
||||
run {
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>pumpEvents<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun pumpEvents() {}
|
||||
|
||||
private fun launch(block: suspend Any.() -> Unit) {}
|
||||
}
|
||||
Reference in New Issue
Block a user