Add intention to convert lambda to anonymous function #KT-7710 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8ef4b9a8e1
commit
8a20d1bf01
@@ -3,6 +3,7 @@
|
||||
// ACTION: Rename to _
|
||||
// ACTION: Specify explicit lambda signature
|
||||
// ACTION: Specify type explicitly
|
||||
// ACTION: Convert to anonymous function
|
||||
// RUNTIME_WITH_FULL_JDK
|
||||
|
||||
fun main() {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// ACTION: Move lambda argument into parentheses
|
||||
// ACTION: Remove explicit lambda parameter types (may break code)
|
||||
// ACTION: Rename to _
|
||||
// ACTION: Convert to anonymous function
|
||||
|
||||
fun foo(block: (String, Int) -> Unit) {
|
||||
block("", 1)
|
||||
|
||||
+1
@@ -6,6 +6,7 @@
|
||||
// ACTION: Replace with safe (this?.) call
|
||||
// ACTION: Specify explicit lambda signature
|
||||
// ACTION: Add return@let
|
||||
// ACTION: Convert to anonymous function
|
||||
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
|
||||
|
||||
fun String?.foo(a: String?) {
|
||||
|
||||
Reference in New Issue
Block a user