Preliminary: support smart casts on variables in closures

No feature support yet
So #KT-14486 In Progress
This commit is contained in:
Mikhail Glukhikh
2017-08-10 17:58:48 +03:00
parent b2d931fb1f
commit a086863561
9 changed files with 144 additions and 10 deletions
@@ -0,0 +1,15 @@
// !LANGUAGE: -CapturedInClosureSmartCasts
fun run(f: () -> Unit) = f()
fun foo(s: String?) {
var x: String? = null
if (s != null) {
x = s
}
if (x != null) {
run {
<!DEBUG_INFO_SMARTCAST!>x<!>.hashCode()
}
}
}