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:
+20
@@ -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() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user