Extract Function: Support multiple output values

This commit is contained in:
Alexey Sedunov
2014-09-04 17:28:25 +04:00
parent 7a15a88288
commit 76433571f8
68 changed files with 1293 additions and 319 deletions
@@ -0,0 +1,19 @@
// WITH_RUNTIME
// PARAM_TYPES: A?, kotlin.Any?
// PARAM_TYPES: B, A
// PARAM_TYPES: kotlin.Int
// PARAM_DESCRIPTOR: var a: A? defined in foo
// PARAM_DESCRIPTOR: value-parameter val b: B defined in foo
// PARAM_DESCRIPTOR: var c: kotlin.Int defined in foo
// SIBLING:
fun foo<A: Any, B: A>(b: B): Int {
var a: A? = null
var c: Int = 1
<selection>a = b
c += 2
println(a)
println(c)</selection>
return a.hashCode() ?: 0 + c
}