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
@@ -1,3 +1,4 @@
// WITH_RUNTIME
fun foo(c : Collection<String>){
c.filter<selection>{it; false}</selection>
}
@@ -1,4 +1,5 @@
// WITH_RUNTIME
fun foo(c : Collection<String>){
val function = { it; false }
val function: (String) -> Boolean = { it; false }
c.filter(function)
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
fun main(args: Array<String>) {
with(A()) {
println(<selection>prop</selection>)
@@ -7,6 +8,4 @@ fun main(args: Array<String>) {
class A {
val prop = 1
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
}
@@ -1,3 +1,4 @@
// WITH_RUNTIME
fun main(args: Array<String>) {
with(A()) {
val i = prop
@@ -8,6 +9,4 @@ fun main(args: Array<String>) {
class A {
val prop = 1
}
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
}