Extract Function: Utilize pseudo-value usage for return type inference

This commit is contained in:
Alexey Sedunov
2014-05-30 13:06:06 +04:00
parent 164338d6f5
commit 1a7e6eab61
35 changed files with 494 additions and 145 deletions
@@ -0,0 +1,5 @@
// SIBLING:
fun foo(a: Int): Int {
val b: Int = 1
return if (<selection>a + b > 0</selection>) 1 else if (a - b < 0) 2 else b
}