MoveVariableDeclarationIntoWhenInspection: report it if initializer is single line even if property is multi line
#KT-39467 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
75d4c7e91c
commit
4569b85a16
+10
@@ -0,0 +1,10 @@
|
||||
fun test() = 42
|
||||
|
||||
fun foo() {
|
||||
val <caret>a =
|
||||
test()
|
||||
when (a) {
|
||||
1 -> 0
|
||||
else -> 24
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun test() = 42
|
||||
|
||||
fun foo() {
|
||||
when (test()) {
|
||||
1 -> 0
|
||||
else -> 24
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
fun test() = 42
|
||||
|
||||
fun foo() {
|
||||
val <caret>a =
|
||||
test()
|
||||
when (a) {
|
||||
1 -> a
|
||||
else -> 24
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() = 42
|
||||
|
||||
fun foo() {
|
||||
when (val a =
|
||||
test()) {
|
||||
1 -> a
|
||||
else -> 24
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user