// !DIAGNOSTICS: -UNUSED_EXPRESSION // COMPARE_WITH_LIGHT_TREE // SKIP_TXT /* * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE) * * SECTIONS: dfa * NUMBER: 68 * DESCRIPTION: Raw data flow analysis test * HELPERS: classes * UNEXPECTED BEHAVIOUR * ISSUES: KT-29083 */ // TESTCASE NUMBER: 1 fun case_1(x: Any?) { if (x!! is Int) { x x.inv() } } // TESTCASE NUMBER: 2 fun case_2(x: Any?) { (x as Nothing?)!! x x.inv() } // TESTCASE NUMBER: 3 fun case_3(x: Any?) { if (x as Number? is Int) { x x.inv() } } // TESTCASE NUMBER: 4 fun case_4(x: Any?) { if (x as Class? is Class) { x x.prop_1 } } // TESTCASE NUMBER: 5 fun case_5(x: Any?) { if (x as Nothing? is Nothing) { x x.inv() } } // TESTCASE NUMBER: 6 fun case_6(x: Any?) { (x as String?)!! x x.length } // TESTCASE NUMBER: 7 fun case_7(x: Any?) { if (x as String? != null) { x x.length } } // TESTCASE NUMBER: 8 fun case_8(x: Any?) { if (x as String? == null) { x x.length } }