Replace with safe call works now on UNSAFE_IMPLICIT_INVOKE #KT-12628 Fixed
(cherry picked from commit 208798d)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
a9c30e878b
commit
995a633229
@@ -0,0 +1,3 @@
|
||||
// "Replace with safe (?.) call" "true"
|
||||
|
||||
fun foo(exec: (() -> Unit)?) = exec<caret>()
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Replace with safe (?.) call" "true"
|
||||
|
||||
fun foo(exec: (() -> Unit)?) = exec?.invoke()
|
||||
@@ -0,0 +1,7 @@
|
||||
// "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>()
|
||||
Reference in New Issue
Block a user