Drop result value if it's not needed

This commit is contained in:
Valentin Kipyatkov
2016-11-10 21:14:25 +03:00
parent adbece82ef
commit 55979aca74
14 changed files with 64 additions and 14 deletions
@@ -3,6 +3,6 @@ fun <caret>f(p: Int) = p + p
fun complexFun(): Int {
}
fun main(args: Array<String>) {
f(complexFun())
fun g(): Int {
return f(complexFun())
}
@@ -1,7 +1,7 @@
fun complexFun(): Int {
}
fun main(args: Array<String>) {
fun g(): Int {
val p = complexFun()
p + p
return p + p
}