Deprecated symbol usages fix for the whole project

This commit is contained in:
Valentin Kipyatkov
2015-05-20 16:11:13 +03:00
parent 78302be571
commit 766ca2b905
27 changed files with 780 additions and 344 deletions
@@ -0,0 +1,11 @@
import newPack.newFun
import pack.oldFun
fun x() {
newFun(1 + 1)
newFun(2 + 1)
}
fun y() {
newFun(3 + 1)
}
@@ -0,0 +1,7 @@
import pack.PackPackage;
class C {
void foo() {
PackPackage.oldFun(-1);
}
}
@@ -0,0 +1,3 @@
package newPack
fun newFun(p: Int){}
@@ -0,0 +1,6 @@
package pack
@deprecated("", ReplaceWith("newFun(p + 1)", "newPack.newFun"))
fun oldFun(p: Int) {
newFun(p + 1)
}
@@ -0,0 +1,8 @@
// "Replace usages of 'oldFun(Int): Unit' in whole project" "true"
import newPack.newFun
import pack.oldFun
fun foo() {
<caret>newFun(0 + 1)
}
@@ -0,0 +1,10 @@
import pack.oldFun
fun x() {
oldFun(1)
oldFun(2)
}
fun y() {
oldFun(3)
}
@@ -0,0 +1,7 @@
import pack.PackPackage;
class C {
void foo() {
PackPackage.oldFun(-1);
}
}
@@ -0,0 +1,7 @@
// "Replace usages of 'oldFun(Int): Unit' in whole project" "true"
import pack.oldFun
fun foo() {
<caret>oldFun(0)
}
@@ -0,0 +1,3 @@
package newPack
fun newFun(p: Int){}
@@ -0,0 +1,6 @@
package pack
@deprecated("", ReplaceWith("newFun(p + 1)", "newPack.newFun"))
fun oldFun(p: Int) {
newFun(p + 1)
}
@@ -0,0 +1,3 @@
fun x() {
pack.bar(pack.newProp)
}
@@ -0,0 +1,7 @@
package pack
@deprecated("", ReplaceWith("newProp"))
val oldProp: String = ""
fun foo(s: String){}
fun bar(s: String){}
@@ -0,0 +1,7 @@
// "Replace usages of 'oldProp: String' in whole project" "true"
import pack.*
fun foo() {
foo(<caret>newProp)
}
@@ -0,0 +1,3 @@
fun x() {
pack.bar(pack.oldProp)
}
@@ -0,0 +1,7 @@
package pack
@deprecated("", ReplaceWith("newProp"))
val oldProp: String = ""
fun foo(s: String){}
fun bar(s: String){}
@@ -0,0 +1,7 @@
// "Replace usages of 'oldProp: String' in whole project" "true"
import pack.*
fun foo() {
foo(<caret>oldProp)
}