Captured value initialization is no more allowed #KT-10445 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-03-21 13:26:53 +03:00
parent e8b665f600
commit bc4ec97043
14 changed files with 188 additions and 19 deletions
@@ -0,0 +1,9 @@
// "Make variable mutable" "true"
fun exec(f: () -> Unit) = f()
fun foo() {
val x: Int
exec {
<caret>x = 42
}
}
@@ -0,0 +1,9 @@
// "Make variable mutable" "true"
fun exec(f: () -> Unit) = f()
fun foo() {
var x: Int
exec {
x = 42
}
}