Files
kotlin-fork/idea/testData/checker/diagnosticsMessage/operatorCallDiagnosticsOnInOperator.kt
T
Mikhail Zarechenskiy b53a3b324f Fix 'infix call' diagnostic for in operation
#KT-8845 Fixed
2017-06-19 17:36:08 +03:00

8 lines
583 B
Kotlin
Vendored

fun call() {
val list : String? = "sdfknsdkfm"
"x" <error descr="[UNSAFE_OPERATOR_CALL] Operator call corresponds to a dot-qualified call 'list.contains(\"x\")' which is not allowed on a nullable receiver 'list'.">in</error> list
"x" <error descr="[UNSAFE_OPERATOR_CALL] Operator call corresponds to a dot-qualified call 'list.contains(\"x\")' which is not allowed on a nullable receiver 'list'.">!in</error> list
}
<error>operator</error> fun CharSequence.contains(<warning>other</warning>: CharSequence, <warning>ignoreCase</warning>: Boolean = false): Boolean = true