JVM_IR KT-46060 'contains' operator without receiver is non-optimizable

This commit is contained in:
Dmitry Petrov
2021-04-14 14:56:55 +03:00
committed by TeamCityServer
parent 21a3a14289
commit 531a0de399
6 changed files with 35 additions and 2 deletions
@@ -0,0 +1,10 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
object O {
@JvmStatic
operator fun contains(x: String): Boolean = x == "O"
}
fun box() =
if ("O" in O) "OK" else "Failed"