Safe Delete: Support secondary constructors
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class J extends B {
|
||||
B b = new B(1);
|
||||
|
||||
public J() {
|
||||
super(1);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
open class B {
|
||||
<caret>constructor(a: Int) {
|
||||
|
||||
}
|
||||
|
||||
constructor(): this(1) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class A: B {
|
||||
constructor(a: Int): super(a) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class C: B(1) {
|
||||
|
||||
}
|
||||
|
||||
fun test() {
|
||||
B(1)
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
constructor B has 5 usages that are not safe to delete.
|
||||
Reference in New Issue
Block a user