KT-1572 Frontend doesn't mark all vars included in closure as refs.

This commit is contained in:
Svetlana Isakova
2012-03-14 15:07:23 +04:00
parent af9f00c177
commit 9dc9e9984b
8 changed files with 37 additions and 15 deletions
+2 -2
View File
@@ -235,8 +235,8 @@ fun mergeAutocasts(a: Any?) {
//mutability
fun f(): String {
var a: Any = 11
if (a is String) {
var <info>a</info>: Any = 11
if (<info>a</info> is String) {
val <warning>i</warning>: String = <error descr="[AUTOCAST_IMPOSSIBLE] Automatic cast to String is impossible, because a could have changed since the is-check">a</error>
<error descr="[AUTOCAST_IMPOSSIBLE] Automatic cast to String is impossible, because a could have changed since the is-check">a</error>.compareTo("f")
val <warning>f</warning>: Function0<String> = { <error descr="[AUTOCAST_IMPOSSIBLE] Automatic cast to String is impossible, because a could have changed since the is-check">a</error> }