KotlinIntroduceVariableHandler: fix for declarations with expression body
#KT-38449 Fixed
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun b(body: () -> Int) = body()
|
||||
|
||||
class A {
|
||||
fun test() = b {
|
||||
<selection>24</selection>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fun b(body: () -> Int) = body()
|
||||
|
||||
class A {
|
||||
fun test(): Int {
|
||||
val i = 24
|
||||
return b {
|
||||
i
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun b(body: () -> Unit): Unit = body()
|
||||
|
||||
class A {
|
||||
fun test() = b {
|
||||
<selection>24</selection>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
fun b(body: () -> Unit): Unit = body()
|
||||
|
||||
class A {
|
||||
fun test() {
|
||||
val i = 24
|
||||
b {
|
||||
i
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user