Imports from current package are redundant too
This commit is contained in:
+5
-1
@@ -9,10 +9,14 @@ import java.net.Unresolved // unused but unresolved
|
||||
|
||||
import java.net.ConnectException as CE // highlighting of unused aliases not implemented yet
|
||||
|
||||
fun foo(list: ArrayList<String>) {
|
||||
import RootPackageClass // unused because it's in the current package
|
||||
|
||||
fun foo(list: ArrayList<String>, p: RootPackageClass) {
|
||||
list.add("")
|
||||
Date()
|
||||
}
|
||||
|
||||
class RootPackageClass
|
||||
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package pack1
|
||||
|
||||
import pack1.ClassInPack1 // unused because it's in the current package
|
||||
|
||||
fun foo(p: ClassInPack1) {
|
||||
}
|
||||
|
||||
class ClassInPack1
|
||||
@@ -0,0 +1,8 @@
|
||||
package pack2
|
||||
|
||||
import pack2.* // unused because it's the current package
|
||||
|
||||
fun foo(p: ClassInPack2) {
|
||||
}
|
||||
|
||||
class ClassInPack2
|
||||
@@ -17,4 +17,21 @@
|
||||
<description>Unused import directive</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>fileInPack1.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="fileInPack1.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused import directive</problem_class>
|
||||
<description>Unused import directive</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>fileInPack2.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="fileInPack2.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused import directive</problem_class>
|
||||
<description>Unused import directive</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
Reference in New Issue
Block a user