Separate UNSAFE_IMPLICIT_INVOKE_CALL diagnostics introduced (see KT-8252)

This commit is contained in:
Mikhail Glukhikh
2016-01-15 10:39:12 +03:00
parent fe11b5a473
commit 6157ebe3b8
11 changed files with 33 additions and 14 deletions
+8
View File
@@ -0,0 +1,8 @@
class Rule(val apply: () -> Unit)
fun foo() {
val rule: Rule? = Rule { }
rule?.<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> kotlin.Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
val apply = rule?.apply
<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type (() -> kotlin.Unit)?, use explicit ?.invoke() to make function-like call instead">apply</error>()
}