blob: e1e13057658e778ff4fa2a9c9ea3ab6f783dbfff [file] [log] [blame]
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
class Rule(val apply: () -> Unit)
fun foo() {
val rule: Rule? = Rule { }
rule?.<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type '(() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead">apply</error>()
val apply = rule?.apply
<error descr="[UNSAFE_IMPLICIT_INVOKE_CALL] Reference has a nullable type '(() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead">apply</error>()
}