Skip to content

Commit 8cce6d0

Browse files
committed
Test fixed
1 parent e471ebe commit 8cce6d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/testData/diagnostics/tests/infos/SmartCasts.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@ fun f(): String {
205205
// a is a string, despite of being a variable
206206
val <!UNUSED_VARIABLE!>i<!>: String = <!DEBUG_INFO_SMARTCAST!>a<!>
207207
<!DEBUG_INFO_SMARTCAST!>a<!>.compareTo("f")
208-
val <!UNUSED_VARIABLE!>f<!>: Function0<String> = { <!DEBUG_INFO_SMARTCAST!>a<!> }
209-
return <!DEBUG_INFO_SMARTCAST!>a<!>
208+
// Beginning from here a is captured in a closure so we have to be cautious
209+
val <!UNUSED_VARIABLE!>f<!>: Function0<String> = { <!SMARTCAST_IMPOSSIBLE!>a<!> }
210+
return <!SMARTCAST_IMPOSSIBLE!>a<!>
210211
}
211212
return ""
212213
}

0 commit comments

Comments
 (0)