Fix false positive "Unused import directive" for imports under several alias
#KT-30949 Fixed
This commit is contained in:
@@ -0,0 +1 @@
|
||||
const val name = 42
|
||||
@@ -0,0 +1,4 @@
|
||||
import name
|
||||
import name as names
|
||||
|
||||
val a = name
|
||||
@@ -0,0 +1,4 @@
|
||||
import name
|
||||
import name as names
|
||||
|
||||
val a = name
|
||||
@@ -0,0 +1,5 @@
|
||||
package duration
|
||||
|
||||
val Int.hours: Int get() = TODO()
|
||||
val Int.minutes: Int get() = TODO()
|
||||
val Int.seconds: Int get() = TODO()
|
||||
@@ -0,0 +1,11 @@
|
||||
import duration.*
|
||||
import duration.hours as hour
|
||||
import duration.minutes as minute
|
||||
import duration.minutes as minutes
|
||||
import duration.seconds as second
|
||||
import duration.seconds as seconds
|
||||
|
||||
fun main() {
|
||||
val totalDuration = 1.hour - 30.minutes + 1.second
|
||||
println(totalDuration)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import duration.minutes
|
||||
import duration.hours as hour
|
||||
import duration.seconds as second
|
||||
|
||||
fun main() {
|
||||
val totalDuration = 1.hour - 30.minutes + 1.second
|
||||
println(totalDuration)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
Additional checking of reference Getter: hour
|
||||
Additional checking of reference KtSimpleNameReference: hour
|
||||
Changed resolve of KtSimpleNameReference: hour
|
||||
Additional checking of reference Getter: second
|
||||
Additional checking of reference KtSimpleNameReference: second
|
||||
Changed resolve of KtSimpleNameReference: second
|
||||
Trying to build import list again with import rules: +duration.hours as hour, +duration.seconds as second
|
||||
Additional checking of reference Getter: hour
|
||||
Additional checking of reference KtSimpleNameReference: hour
|
||||
Changed resolve of KtSimpleNameReference: hour
|
||||
Additional checking of reference Getter: second
|
||||
Additional checking of reference KtSimpleNameReference: second
|
||||
Changed resolve of KtSimpleNameReference: second
|
||||
Reference in New Issue
Block a user