Code cleanup includes deprecated symbol usage fixes + code cleanup does not crash on nested usages to fix

This commit is contained in:
Valentin Kipyatkov
2015-05-27 21:30:28 +03:00
parent d415b0c74d
commit 2b61bca6dd
6 changed files with 29 additions and 4 deletions
@@ -26,9 +26,12 @@ val x = fun foo(x: String) { }
fun foo() {
@loop
for (i in 1..100) {
val v = oldFun2(i as Int) as Int
/* comment */
continue@loop
}
oldFun1(oldFun2(10))
}
fun unnecessarySafeCall(x: String) {
@@ -28,9 +28,12 @@ val x = fun(x: String) { }
fun foo() {
loop@
for (i in 1..100) {
val v = oldFun2(i as Int)
/* comment */
continue@loop
}
bar(bar(10 + 2) + 1)
}
fun unnecessarySafeCall(x: String) {
@@ -0,0 +1,7 @@
@deprecated("", ReplaceWith("bar(p + 1)"))
public fun oldFun1(p: Int): Int = 0
@deprecated("", ReplaceWith("bar(p + 2)"))
public fun oldFun2(p: Int): Int = 0
public fun bar(p: Int): Int = p