Back to Intellij Community

IncompleteDestructuring

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/IncompleteDestructuring.html

2025.3-rc-2355 B
Original Source

Reports incomplete destructuring declaration.

Example:

data class Person(val name: String, val age: Int)
  val person = Person("", 0)
  val (name) = person

The quick fix completes destructuring declaration with new variables:

data class Person(val name: String, val age: Int)
  val person = Person("", 0)
  val (name, age) = person