Unused symbol: handling of import as alias not only for objects / enums #KT-11933 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// "Safe delete 'Imported'" "false"
|
||||
// ACTION: Create test
|
||||
// ACTION: Move 'ImportedClass' to separate file
|
||||
import ImportedClass as ClassAlias
|
||||
|
||||
class <caret>ImportedClass
|
||||
|
||||
fun use() {
|
||||
ClassAlias().hashCode()
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Safe delete 'useMe'" "false"
|
||||
// ACTION: Convert function to property
|
||||
// ACTION: Convert to block body
|
||||
// ACTION: Create test
|
||||
// ACTION: Specify return type explicitly
|
||||
|
||||
import useMe as used
|
||||
|
||||
fun <caret>useMe() = 0
|
||||
|
||||
fun foo() = used()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import Imported as Alias
|
||||
|
||||
fun foo() {
|
||||
Alias.hashCode()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Safe delete 'Imported'" "false"
|
||||
// ACTION: Create test
|
||||
object <caret>Imported
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Safe delete 'usedVar'" "false"
|
||||
// ACTION: Specify type explicitly
|
||||
import usedVar as used
|
||||
|
||||
var <caret>usedVar = 0
|
||||
|
||||
fun foo() {
|
||||
used++
|
||||
}
|
||||
Reference in New Issue
Block a user