Implement "Safe Delete" refactoring for value parameters
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(1, 2)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(2)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(<caret>a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(1, 2)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(2)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(1, 2)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(2)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(1, 2)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(2)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(1, 2)
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(2)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(2)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(2)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(2)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
trait Z {
|
||||
open fun foo(<caret>a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(<caret>a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class A {
|
||||
open fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D: B(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(<caret>a: Int, b: String, c: Any) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo("1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(<caret>a: Int, b: String, c: Any) {
|
||||
println(b)
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(b: String, c: Any) {
|
||||
println(b)
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(<caret>a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
System.out.println(a);
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(<caret>a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
println(a)
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
class A {
|
||||
public void foo(int a, int b) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class D extends B implements Z {
|
||||
public void foo(int a, int b) {
|
||||
System.out.println(a);
|
||||
}
|
||||
}
|
||||
|
||||
class U {
|
||||
void bar(A a) {
|
||||
a.foo(1, 2)
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
b.foo(3, 4)
|
||||
}
|
||||
|
||||
void bar(C c) {
|
||||
c.foo(5, 6)
|
||||
}
|
||||
|
||||
void bar(D d) {
|
||||
d.foo(7, 8)
|
||||
}
|
||||
|
||||
void bar(Z z) {
|
||||
z.foo(9, 10)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
trait Z {
|
||||
open fun foo(a: Int, b: Int)
|
||||
}
|
||||
|
||||
open class B: A(), Z {
|
||||
override fun foo(a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class C: A() {
|
||||
override fun foo(<caret>a: Int, b: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
parameter a has 1 usage that is not safe to delete.
|
||||
Of those 0 usages are in strings, comments, or non-code files.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo("1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(<caret>a: Int, b: String, c: Any) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(b: String, c: Any) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(a: Int, <caret>b: String, c: Any) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(a: Int, c: Any) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class B {
|
||||
void bar(A a) {
|
||||
a.foo(1, "1")
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(a: Int, b: String, <caret>c: Any) {
|
||||
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
fun foo(a: Int, b: String) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user