// !DIAGNOSTICS: -UNUSED_EXPRESSION -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER // SKIP_TXT /* * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE) * * SECTIONS: dfa * NUMBER: 65 * DESCRIPTION: Raw data flow analysis test * HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses */ // TESTCASE NUMBER: 1 fun case_1(x: Class) { if (x.prop_13 !is String) return x.prop_13 x.prop_13.length } // TESTCASE NUMBER: 2 fun case_2(x: Any?) { if (x !is String) return x x.length } // TESTCASE NUMBER: 3 fun case_3(x: Class) { if (x.prop_13 !is String) throw Exception() x.prop_13 x.prop_13.length } // TESTCASE NUMBER: 4 fun case_4(x: Any?) { if (x !is String) throw Exception() x x.length } // TESTCASE NUMBER: 5 fun case_5(x: Class) { if (x.prop_13 !is String?) throw Exception() x.prop_13 x.prop_13?.length } // TESTCASE NUMBER: 6 fun case_6(x: Any?) { if (x !is String?) throw Exception() x x?.length } // TESTCASE NUMBER: 7 fun case_7(x: Any?) { if (x !is Pair<*, *>) throw Exception() ")!>x ")!>x.first } // TESTCASE NUMBER: 8 fun case_8(x: Any?) { if (x !is Pair<*, *>?) return ?")!>x ?")!>x?.first } // TESTCASE NUMBER: 9 fun case_9(x: Any?) { when (x) { !is Pair<*, *> -> throw Exception() else -> { ")!>x ")!>x.first } } ")!>x ")!>x.first } // TESTCASE NUMBER: 10 fun case_10(x: Any?) { when (x) { !is Pair<*, *>? -> return else -> { ?")!>x ?")!>x?.first } } ?")!>x ?")!>x?.first } // TESTCASE NUMBER: 11 fun case_11(x: Any?) { when { x !is Pair<*, *> -> throw Exception() else -> { ")!>x ")!>x.first } } ")!>x ")!>x.first } // TESTCASE NUMBER: 12 fun case_12(x: Any?) { when { x !is Pair<*, *>? -> return else -> { ?")!>x ?")!>x?.first } } ?")!>x ?")!>x?.first }