[NI] Report unsafe implicit invoke accordingly to OI

This reverts commit df046683cc.
KT-30695
This commit is contained in:
Pavel Kirpichenkov
2020-02-13 16:13:53 +03:00
parent 1a2d28d25b
commit b161839092
30 changed files with 286 additions and 62 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
// !WITH_NEW_INFERENCE
class Rule(val apply:() -> Unit)
fun bar() {}
@@ -14,7 +13,7 @@ fun foo() {
rule?.apply?.invoke()
// this should be an error
rule?.<!OI;UNSAFE_IMPLICIT_INVOKE_CALL!>apply<!>()
rule?.<!UNSAFE_IMPLICIT_INVOKE_CALL!>apply<!>()
// these both also ok (with smart cast / unnecessary safe call)
if (rule != null) {