Auto-imports for index functions, += like operators, invoke, delegates and components
#KT-9482 Fixed #KT-9397 Fixed #KT-8060 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
0f85d770dd
commit
2f26480e6b
@@ -0,0 +1,42 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Multi-declaration initializer of type some.Some must have a 'component2()' function
|
||||
|
||||
package testing
|
||||
|
||||
import some.Some
|
||||
import some.component1
|
||||
|
||||
fun testing() {
|
||||
val (a, b) = <caret>Some()
|
||||
}
|
||||
//-----------------------
|
||||
|
||||
|
||||
// FILE: second.kt
|
||||
|
||||
package some
|
||||
|
||||
public class Some
|
||||
|
||||
operator fun Some.component1() = 1
|
||||
operator fun Some.component2() = 3
|
||||
//-----------------------
|
||||
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Multi-declaration initializer of type some.Some must have a 'component2()' function
|
||||
|
||||
package testing
|
||||
|
||||
import some.Some
|
||||
import some.component1
|
||||
import some.component2
|
||||
|
||||
fun testing() {
|
||||
val (a, b) = <caret>Some()
|
||||
}
|
||||
//-----------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user