Fix 'infix call' diagnostic for in operation

#KT-8845 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-06-19 03:44:10 +03:00
parent d17f31c8b0
commit b53a3b324f
14 changed files with 97 additions and 52 deletions
@@ -0,0 +1,8 @@
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