Introduce Variable: Allow choosing extraction scope for expressions in the lambda body
#KT-7720 Fixed
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
fun foo(f: (Int) -> Int) = f(0)
|
||||
fun bar(f: () -> Int) = f()
|
||||
|
||||
fun test() {
|
||||
foo { val it1 = it
|
||||
bar { (1 + 2) * it1 } }
|
||||
}
|
||||
Reference in New Issue
Block a user