Fix priority for "add import" action wrt DeprecatedSinceKotlin

This commit is contained in:
Mikhail Zarechenskiy
2020-06-25 11:05:56 +03:00
parent beca7fca30
commit 6efa7a51c6
5 changed files with 129 additions and 11 deletions
@@ -0,0 +1,50 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
import aaa.Some
fun testing() {
val (a) = <caret>Some()
}
//-----------------------
// FILE: second.kt
package aaa
public class Some
@Deprecated("Bad, use from package other")
@DeprecatedSinceKotlin(warningSince = "1.0")
operator fun Some.component1() = 1
//-----------------------
// FILE: other_second.kt
package other
import aaa.Some
operator fun Some.component1() = 1
//-----------------------
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
import aaa.Some
import other.component1
fun testing() {
val (a) = <caret>Some()
}
//-----------------------
@@ -0,0 +1,50 @@
// FILE: first.before.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
import aaa.Some
fun testing() {
val (a) = <caret>Some()
}
//-----------------------
// FILE: second.kt
package aaa
public class Some
@Deprecated("Good")
@DeprecatedSinceKotlin(warningSince = "999.999")
operator fun Some.component1() = 1
//-----------------------
// FILE: other_second.kt
package other
import aaa.Some
operator fun Some.component1() = 1
//-----------------------
// FILE: first.after.kt
// "Import" "true"
// ERROR: Destructuring declaration initializer of type Some must have a 'component1()' function
package testing
import aaa.Some
import aaa.component1
fun testing() {
val (a) = <caret>Some()
}
//-----------------------