Add Safe Delete tests for extension functions and properties
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import test.foo
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
|
||||
fun B.<caret>foo() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import test.foo
|
||||
|
||||
class B {
|
||||
val ref = ::foo
|
||||
}
|
||||
|
||||
fun B.<caret>foo() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
function test.foo has 1 usage that is not safe to delete.
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
fun String.<caret>bar() {
|
||||
|
||||
}
|
||||
|
||||
"".bar()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
function foo.bar has 1 usage that is not safe to delete.
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
fun String.<caret>bar() {
|
||||
|
||||
}
|
||||
|
||||
println()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun foo() {
|
||||
|
||||
println()
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class A {
|
||||
void fun bar() {
|
||||
TestPackage.foo("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
fun String.<caret>foo() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
function test.foo has 1 usage that is not safe to delete.
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import test.foo
|
||||
|
||||
val B.<caret>foo = "foo"
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
class B {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import test.foo
|
||||
|
||||
val String.<caret>foo = "foo"
|
||||
|
||||
class B {
|
||||
val ref = "".foo
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
property test.foo has 1 usage that is not safe to delete.
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class A {
|
||||
void bar() {
|
||||
TestPackage.getFoo("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package test
|
||||
|
||||
import test.foo
|
||||
|
||||
val String.<caret>foo = "foo"
|
||||
@@ -0,0 +1 @@
|
||||
property test.foo has 1 usage that is not safe to delete.
|
||||
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(<caret>a: Int, b: String, c: Any) {
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
fun bar(a: A) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(b: String, c: Any) {
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
fun bar(a: A) {
|
||||
a.foo("1", "!")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(a: Int, <caret>b: String, c: Any) {
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
fun bar(a: A) {
|
||||
a.foo(1, "1", "!")
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(a: Int, c: Any) {
|
||||
|
||||
}
|
||||
|
||||
class B {
|
||||
fun bar(a: A) {
|
||||
a.foo(1, "!")
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class B {
|
||||
void bar(A a) {
|
||||
TestPackage.foo(a, 1, "1", "!");
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class B {
|
||||
void bar(A a) {
|
||||
TestPackage.foo(a, "1", "!");
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(<caret>a: Int, b: String, c: Any) {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(b: String, c: Any) {
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class B {
|
||||
void bar(A a) {
|
||||
TestPackage.foo(a, 1, "1", "!");
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class B {
|
||||
void bar(A a) {
|
||||
TestPackage.foo(a, 1, "!");
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(a: Int, <caret>b: String, c: Any) {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class A {
|
||||
|
||||
}
|
||||
|
||||
fun A.foo(a: Int, c: Any) {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user