Files
openide/plugins/kotlin/idea/tests/testData/quickfix/variables/unusedVariableInDestructuringDeclaration.kt
Vladimir Dolzhenko 963bb6ef53 [kotlin] Fix types inlay hints
#KTIJ-28592 Fixed

GitOrigin-RevId: 4530af4e59e621d9feb8f1100cdb709a3ff1b0e1
2024-01-24 22:19:13 +00:00

17 lines
499 B
Kotlin

// "Remove variable 'one'" "false"
// ACTION: Enable a trailing comma by default in the formatter
// ACTION: Enable option 'Local variable types' for 'Types' inlay hints
// ACTION: Rename to _
// ACTION: Specify all types explicitly in destructuring declaration
// ACTION: Specify type explicitly
fun test(condition: Boolean, foo: Foo) {
val v = if (condition) {
val (<caret>one, two) = foo
two
} else {
null
}
}
data class Foo(val one: String, val two: String)