Files
kotlin-fork/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt
T
Mikhail Glukhikh 995a633229 Replace with safe call works now on UNSAFE_IMPLICIT_INVOKE #KT-12628 Fixed
(cherry picked from commit 208798d)
2016-07-29 20:12:11 +03:00

7 lines
356 B
Kotlin
Vendored

// "Replace with safe (?.) call" "false"
// ACTION: Convert to block body
// ACTION: Replace overloaded operator with function call
// ACTION: Wrap with '?.let { ... }' call
// ERROR: Reference has a nullable type '(String.() -> Unit)?', use explicit '?.invoke()' to make a function-like call instead
fun foo(exec: (String.() -> Unit)?) = "".exec<caret>()