Files
kotlin-fork/idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt
T
2017-07-17 16:09:48 +03:00

11 lines
497 B
Kotlin
Vendored

// "Create property 'address2' as constructor parameter" "false"
// ACTION: Create property 'address' as constructor parameter
// ERROR: Destructuring declaration initializer of type Person must have a 'component3()' function
// ERROR: Destructuring declaration initializer of type Person must have a 'component4()' function
data class Person(val name: String, val age: Int)
fun person(): Person = TODO()
fun main(args: Array<String>) {
val (name, age, address, address2) = <caret>person()
}