// !DIAGNOSTICS: -UNUSED_EXPRESSION // SKIP_TXT /* * KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE) * * SECTIONS: dfa * NUMBER: 38 * DESCRIPTION: Raw data flow analysis test * HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses */ // TESTCASE NUMBER: 1 fun case_1(x: Comparable<*>?) { if (x is Byte?) { ?")!>x ?")!>x?.equals(10) x!!.dec() } } // TESTCASE NUMBER: 2 fun case_2(x: ClassWithThreeTypeParameters<*, *, *>?) { if (x is InterfaceWithTwoTypeParameters<*, *>?) { ? & InterfaceWithTwoTypeParameters<*, *>?")!>x ? & InterfaceWithTwoTypeParameters<*, *>?")!>x?.x x?.y x?.z & InterfaceWithTwoTypeParameters<*, *>}")!>x!!.ip2test() & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.x } } // TESTCASE NUMBER: 3 fun case_3(x: ClassWithThreeTypeParameters<*, *, *>) { if (x is InterfaceWithTwoTypeParameters<*, *>?) { & InterfaceWithTwoTypeParameters<*, *>")!>x & InterfaceWithTwoTypeParameters<*, *>")!>x.x x.y x.z & InterfaceWithTwoTypeParameters<*, *>}")!>x!!.ip2test() & InterfaceWithTwoTypeParameters<*, *>")!>x & InterfaceWithTwoTypeParameters<*, *>")!>x.x } } // TESTCASE NUMBER: 4 fun case_4(x: ClassWithSixTypeParameters<*, *, *, *, *, *>?) { if (x is InterfaceWithTwoTypeParameters<*, *>) { & ClassWithSixTypeParameters<*, *, *, *, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x & ClassWithSixTypeParameters<*, *, *, *, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.x x.y x.z x.u & InterfaceWithTwoTypeParameters<*, *>}")!>x!!.ip2test() & ClassWithSixTypeParameters<*, *, *, *, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x & ClassWithSixTypeParameters<*, *, *, *, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.x } } // TESTCASE NUMBER: 5 fun case_5(x: ClassWithThreeTypeParameters<*, *, *>?) { if (x is InterfaceWithTwoTypeParameters<*, *>?) { if (x === null) return & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.x x.y x.z & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.ip2test() & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x & ClassWithThreeTypeParameters<*, *, *>? & InterfaceWithTwoTypeParameters<*, *>")!>x.x } } // TESTCASE NUMBER: 6 fun case_5(x: Any?) { if (x is ClassWithThreeTypeParameters<*, *, *>?) { if (x is InterfaceWithTwoTypeParameters<*, *>?) { if (x === null) return & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any & kotlin.Any?")!>x & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x.x x.y x.z & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x.ip2test() & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any & kotlin.Any?")!>x & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x.x } } }