Files
kotlin-fork/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt
T
Mikhail Glukhikh c084eefb65 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago
2019-02-25 10:37:46 +03:00

9 lines
409 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
// ACTION: Convert to run
// ACTION: Convert to with
// 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>()