Call method references search in UnusedSymbolInspection.hasReferences to fix secondary constructor search

Makes #KT-12500 Fixed
Makes #KT-12501 Fixed
This commit is contained in:
Mikhail Glukhikh
2016-11-25 16:12:47 +03:00
parent 784fe31053
commit 299f477a1b
12 changed files with 124 additions and 4 deletions
@@ -0,0 +1,20 @@
class CtorUsedByOtherCtor {
constructor()
constructor(p: String): this()
}
open class CtorUsedParent {
constructor()
}
class CtorUsedChild : CtorUsedParent {
constructor() : super()
}
@test.anno.EntryPoint
fun use(): Int {
val first = CtorUsedByOtherCtor("")
val second = CtorUsedChild(true)
return first.hashCode() + second.hashCode()
}
@@ -2,4 +2,9 @@ class RandomJavaClass {
void g() {
foo.UsedInJavaKt.usedInJava();
}
public void context() {
foo.Ctor c = new foo.Ctor(0);
c.justCompare();
}
}
@@ -1,4 +1,9 @@
package foo
fun usedInJava() {
}
}
class Ctor {
constructor(p: Int)
fun justCompare() {}
}