Fix false positive "Unused symbol" for type alias & private nested class/object

#KT-21526 Fixed
 #KT-30527 Fixed
This commit is contained in:
Dmitry Gridin
2019-03-25 15:46:03 +07:00
parent 4441b1579f
commit 74cd53963d
10 changed files with 181 additions and 38 deletions
@@ -0,0 +1,17 @@
// PROBLEM: none
import TestClass.NamedObject.CONST
class TestClass{
fun method(){
CONST
}
private object NamedObject<caret> {
const val CONST = "abc"
}
}
fun main(){
TestClass().method()
}
@@ -0,0 +1,19 @@
// PROBLEM: none
import MVE.Used.Companion.doStuff1
fun main() {
MVE("").test()
}
data class MVE(private val parameter: CharSequence) {
fun test() = parameter.doStuff1()
private data class Used<caret>(val parameter: CharSequence) {
companion object {
fun CharSequence.doStuff1() = Used(this).doStuff2()
}
private fun doStuff2() = ""
}
}
@@ -0,0 +1,12 @@
// PROBLEM: none
import Other.HELLO
val ONE = HELLO
enum class MyEnum {
HELLO,
WORLD
}
typealias Other<caret> = MyEnum