Rewritten resolving conflicting imports on adding new import with star action (KT-18503)
#KT-18503 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
ed5051a5e3
commit
5aa7216c13
@@ -3,4 +3,4 @@ package p
|
||||
|
||||
import dependency.*
|
||||
|
||||
val d = Date(1, 2)
|
||||
val d = Date("") //import dependency.Date is not necessary
|
||||
@@ -2,7 +2,6 @@
|
||||
package p
|
||||
|
||||
import dependency.*
|
||||
import dependency.Date
|
||||
import java.util.*
|
||||
|
||||
val d = Date(1, 2)
|
||||
val d = Date("") //import dependency.Date is not necessary
|
||||
@@ -0,0 +1,5 @@
|
||||
package dependency
|
||||
|
||||
class Date
|
||||
|
||||
fun Date(s: String) = Date()
|
||||
@@ -0,0 +1,6 @@
|
||||
// IMPORT: java.util.Calendar
|
||||
package p
|
||||
|
||||
import dependency.*
|
||||
|
||||
val d = Date()
|
||||
@@ -0,0 +1,8 @@
|
||||
// IMPORT: java.util.Calendar
|
||||
package p
|
||||
|
||||
import dependency.*
|
||||
import dependency.Date
|
||||
import java.util.*
|
||||
|
||||
val d = Date()
|
||||
@@ -0,0 +1,9 @@
|
||||
package conflicts.extensions
|
||||
|
||||
fun Byte.inv(): Byte = (255 - this).toByte()
|
||||
|
||||
fun foo1() {}
|
||||
fun foo2() {}
|
||||
fun foo3() {}
|
||||
fun foo4() {}
|
||||
fun foo5() {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package conflicts.extensions.deps
|
||||
|
||||
fun Byte.inv(): Byte = (255 - this).toByte()
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//IMPORT: conflicts.extensions.foo5
|
||||
package p
|
||||
|
||||
import conflicts.extensions.foo1
|
||||
import conflicts.extensions.foo2
|
||||
import conflicts.extensions.foo3
|
||||
import conflicts.extensions.foo4
|
||||
import conflicts.extensions.deps.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val b: Byte = 1
|
||||
b.inv()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
//IMPORT: conflicts.extensions.foo5
|
||||
package p
|
||||
|
||||
import conflicts.extensions.*
|
||||
import conflicts.extensions.deps.*
|
||||
import conflicts.extensions.deps.inv
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val b: Byte = 1
|
||||
b.inv()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package conflicts.extensions
|
||||
|
||||
fun Byte.inv(): Byte = (255 - this).toByte()
|
||||
|
||||
fun foo1() {}
|
||||
fun foo2() {}
|
||||
fun foo3() {}
|
||||
fun foo4() {}
|
||||
fun foo5() {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package conflicts.extensions.deps
|
||||
|
||||
fun Byte.inv(max: Int): Byte = (max - this).toByte()
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//IMPORT: conflicts.extensions.foo5
|
||||
package p
|
||||
|
||||
import conflicts.extensions.foo1
|
||||
import conflicts.extensions.foo2
|
||||
import conflicts.extensions.foo3
|
||||
import conflicts.extensions.foo4
|
||||
import conflicts.extensions.deps.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val b: Byte = 1
|
||||
b.inv(255)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//IMPORT: conflicts.extensions.foo5
|
||||
package p
|
||||
|
||||
import conflicts.extensions.*
|
||||
import conflicts.extensions.deps.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val b: Byte = 1
|
||||
b.inv(255)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package dependency
|
||||
|
||||
typealias Date = String
|
||||
|
||||
fun util1() = 1
|
||||
fun util2() = 2
|
||||
fun util3() = 3
|
||||
fun util4() = 4
|
||||
@@ -0,0 +1,18 @@
|
||||
// IMPORT: dependency.util4
|
||||
package p
|
||||
|
||||
import dependency.util1
|
||||
import dependency.util2
|
||||
import dependency.util3
|
||||
import dependency.Date
|
||||
import java.util.*
|
||||
|
||||
val aMap: AbstractMap<Int, Int>? = null
|
||||
val calendar: Calendar? = null
|
||||
|
||||
fun klass(): Date {
|
||||
util1()
|
||||
util2()
|
||||
util3()
|
||||
return Date()
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// IMPORT: dependency.util4
|
||||
package p
|
||||
|
||||
import dependency.*
|
||||
import dependency.Date
|
||||
import java.util.*
|
||||
|
||||
val aMap: AbstractMap<Int, Int>? = null
|
||||
val calendar: Calendar? = null
|
||||
|
||||
fun klass(): Date {
|
||||
util1()
|
||||
util2()
|
||||
util3()
|
||||
return Date()
|
||||
}
|
||||
Reference in New Issue
Block a user