Files
kotlin-fork/idea/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test
T
Dmitry Gridin 6c439ae85a Create TrailingCommaIntention
#KT-34744
2020-02-04 21:34:53 +07:00

28 lines
640 B
Plaintext
Vendored

// FILE: first.before.kt
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
// ACTION: Create extension function 'Some.component1'
// ACTION: Create member function 'Some.component1'
// ACTION: Enable a trailing comma by default in the formatter
// ACTION: Introduce import alias
package testing
import some.Some
import some.component2
fun testing() {
val (a, b) = <caret>Some()
}
//-----------------------
// FILE: second.kt
package some
public class Some
fun Some.component1() = 1
operator fun Some.component2() = 3