Clear DF info for variables assigned in 'try' #KT-17929 Fixed

This commit is contained in:
Mikhail Glukhikh
2017-05-19 15:57:36 +03:00
committed by Mikhail Glukhikh
parent 0fd70df681
commit adbece82ef
10 changed files with 54 additions and 9 deletions
@@ -1,3 +1,5 @@
// !LANGUAGE: +SoundSmartCastsAfterTry
fun bar(arg: Any?) = arg
fun foo() {
@@ -6,7 +8,7 @@ fun foo() {
try {
s = "Test"
} catch (ex: Exception) {}
bar(<!DEBUG_INFO_CONSTANT!>s<!>)
if (<!SENSELESS_COMPARISON!><!DEBUG_INFO_CONSTANT!>s<!> != null<!>) { }
<!DEBUG_INFO_CONSTANT!>s<!><!UNSAFE_CALL!>.<!>hashCode()
bar(s)
if (s != null) { }
s<!UNSAFE_CALL!>.<!>hashCode()
}