DeprecatedSymbolUsageFix: dealing with dropping arguments with potential side effects + stdlib's "let" has no receiver type bound

This commit is contained in:
Valentin Kipyatkov
2015-05-19 23:44:58 +03:00
parent 08cfca56f8
commit 5c445ca003
21 changed files with 369 additions and 35 deletions
@@ -0,0 +1,14 @@
// "Replace with 'newFun(p2)'" "true"
@deprecated("", ReplaceWith("newFun(p2)"))
fun oldFun(p1: Int, p2: Int): Boolean {
return newFun(p2)
}
fun newFun(p: Int) = false
fun foo(list: List<Int>) {
list.filter { !<caret>oldFun(bar(), it) }
}
fun bar(): Int = 0