FIR: Adjust testData for spec tests: dfa
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,629 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 10
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, functions, properties
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
val x = expandInv(Inv(select(10, null)))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2() {
|
||||
val x = expandOut(Out(select(10, null)))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
val x = expandInv(Inv(select(10, null)))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
val x = expandOut(Out(select(10, null)))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x = expandIn(In<Number?>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6() {
|
||||
val x = expandIn(In<Number?>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun <T> case_7(x: MutableMap<T?, out T?>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_7() {
|
||||
val x = case_7(mutableMapOf(10 to 10))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun <T> case_8(x: MutableMap<T, out T>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_8() {
|
||||
val x = case_8(mutableMapOf(10 to null))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun <T>case_9(x: MutableMap<T, out T>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_9() {
|
||||
val x = case_9(mutableMapOf(null to 10))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun <T> case_10(x: MutableMap<T?, out T>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_10() {
|
||||
val x = case_10(mutableMapOf(10 to 10))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun <T> case_11(x: MutableMap<T, out T?>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_11() {
|
||||
val x = case_11(mutableMapOf(10 to 10))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun <T, K: T, M: K> case_12(x: MutableMap<M, K?>) = select(x.values.first(), x.keys.first())
|
||||
|
||||
fun case_12() {
|
||||
val x = case_12(mutableMapOf(10 to 11))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* ISSUES: KT-28334
|
||||
* NOTE: before fix of the issue type is inferred to {Int? & Byte? & Short? & Long?} (smart cast from {Int? & Byte? & Short? & Long?}?)
|
||||
*/
|
||||
fun <T> case_13(x: Out<T?>?, y: Out<T>) = select(x, y)
|
||||
|
||||
fun case_13() {
|
||||
val x = case_13(Out<Int?>(), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun <T> case_14(x: Out<T>?, y: Out<T?>) = select(x, y)
|
||||
|
||||
fun case_14() {
|
||||
val x = case_14(Out<Int>(), Out<Int?>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun <T> case_15(x: Out<T>, y: Out<T?>?) = select(x, y)
|
||||
|
||||
fun case_15() {
|
||||
val x = case_15(Out(), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 16
|
||||
* ISSUES: KT-28334
|
||||
* NOTE: before fix of the issue type is inferred to {Int? & Byte? & Short? & Long?} (smart cast from {Int? & Byte? & Short? & Long?}?)
|
||||
*/
|
||||
fun <T> case_16(x: Out<T?>, y: Out<T>) = select(x, select(y, null))
|
||||
|
||||
fun case_16() {
|
||||
val x = case_16(Out<Int?>(), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun <T> case_17(x: Out<T>, y: Out<T?>) = select(x, select(y, null))
|
||||
|
||||
fun case_17() {
|
||||
val x = case_17(Out<Int>(), Out<Number?>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?> & Out<kotlin.Number?>?")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 18
|
||||
* ISSUES: KT-28334
|
||||
* NOTE: before fix of the issue type is inferred to {Int? & Byte? & Short? & Long?} (smart cast from {Int? & Byte? & Short? & Long?}?)
|
||||
*/
|
||||
fun <T> case_18(x: Out<T?>, y: Out<T>) = select(x, y)
|
||||
|
||||
fun case_18() {
|
||||
val x = case_18(Out<Number?>(), Out<Int>())
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Number?>")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun <T> case_19(x: Out<T?>, y: Out<T>) = select(x, y)
|
||||
|
||||
fun case_19() {
|
||||
val x = case_19(Out<Int>(), Out())
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?>")!>x<!>.funNullableAny()
|
||||
val y = x.get()
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>y<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun <T> case_20(x: Out<T>, y: Out<T>) = select(x.get(), y.get())
|
||||
|
||||
fun case_20(y: Int?) {
|
||||
val x = case_20(Out(y), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun <T> case_21(x: Out<T?>, y: Out<T>) = select(x.get(), y.get())
|
||||
|
||||
fun case_21(y: Int?) {
|
||||
val x = case_21(Out(y), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun <T> case_22(x: Out<T?>, y: Out<T>): T? = select(x.get(), y.get())
|
||||
|
||||
fun case_22(y: Int?) {
|
||||
val x = case_22(Out(y), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun <T> case_23(x: Out<T>, y: Out<T>): T = select(x.get(), y.get())
|
||||
|
||||
fun case_23(y: Int?) {
|
||||
val x = case_13(Out(y), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun <A, B : A, C: B, D: C, E: D, F> case_24(x: Out<A>, y: Out<F>) where F : E? = select(x.get(), y.get())
|
||||
|
||||
fun case_24(y: Int) {
|
||||
val x = case_13(Out(y), Out<Int>())
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 25
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29054
|
||||
*/
|
||||
fun <A, B : Out<A>, C: Out<B>, D: Out<C>, E: Out<D>, F> case_25(x: F, y: Out<C>) where F : Out<E?> =
|
||||
select(x.get()?.get()?.get()?.get()?.get(), y.get().get().get())
|
||||
|
||||
fun case_25(y: Int) {
|
||||
val x = case_25(Out(Out(Out(Out(Out(y))))), Out(Out(Out(y))))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 26
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29054
|
||||
*/
|
||||
fun <A, B : Out<A>, C: Out<B>, D: Out<C>, E: Out<D>, F> case_26(x: F, y: Out<C>) where F : Out<E?> =
|
||||
select(x.get()?.get()?.get()?.get()?.get(), y.get().get().get())
|
||||
|
||||
fun case_26(y: Int) {
|
||||
val x = case_26(Out(Out(Out(Out(Out(y))))), Out(Out(Out(y))))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 11
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, functions, interfaces, properties
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun <A, B : Inv<A>, C: Out<A?>> case_1(a: C, b: B) = select(a.x, b.x)
|
||||
|
||||
fun case_1() {
|
||||
val x = case_1(Out(10), Inv(0.1))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Double & kotlin.Int> & kotlin.Number? & kotlin.Comparable<kotlin.Double & kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun <A, B : Inv<A>, C: Out<A?>> case_2(a: C, b: B) = select(a.x, b.x)
|
||||
|
||||
fun case_2(y: Int) {
|
||||
val x = case_2(Out(y), Inv(0.1))
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Double>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_3(a: Int?, b: Float?, c: Double?, d: Boolean?) {
|
||||
when (d) {
|
||||
true -> a
|
||||
false -> b
|
||||
null -> c
|
||||
}.apply {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>this<!>
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>")!>this<!>.funNullableAny()
|
||||
}
|
||||
}.let {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double> & kotlin.Number? & kotlin.Comparable<kotlin.Int & kotlin.Float & kotlin.Double>?")!>it<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_4(a: Interface1?, b: Interface2?, c: Boolean) {
|
||||
a as Interface2?
|
||||
b as Interface1?
|
||||
val x = when (c) {
|
||||
true -> a
|
||||
false -> b
|
||||
}
|
||||
|
||||
x.apply {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2? & Interface1?")!>this<!>
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
x.let {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2? & Interface1?")!>it<!>
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_5(a: Interface1?, b: Interface2?, d: Boolean) {
|
||||
a as Interface2?
|
||||
b as Interface1
|
||||
val x = when (d) {
|
||||
true -> a
|
||||
false -> b
|
||||
}
|
||||
|
||||
x.apply {
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
x.let {
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_6(a: Interface1?, b: Interface2, d: Boolean) {
|
||||
a as Interface2?
|
||||
b as Interface1
|
||||
val x = when (d) {
|
||||
true -> a
|
||||
false -> b
|
||||
}
|
||||
|
||||
x.apply {
|
||||
this as Interface3
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest2()
|
||||
}
|
||||
}
|
||||
x.let {
|
||||
it as Interface3
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.itest2()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_7(a: Interface1?, b: Interface2?, d: Boolean) {
|
||||
a as Interface2?
|
||||
b as Interface1?
|
||||
val x = when (d) {
|
||||
true -> a
|
||||
false -> b
|
||||
}
|
||||
|
||||
x.apply {
|
||||
this as Interface3?
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3? & Interface2? & Interface1? & Interface3? & Interface2? & Interface1?")!>this<!>
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest2()
|
||||
}
|
||||
}
|
||||
x.let {
|
||||
it as Interface3?
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3? & Interface2? & Interface1? & Interface2? & Interface1?")!>it<!>
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>it<!>.itest2()
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 14
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(vararg x: Int?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.IntArray & kotlin.IntArray")!>x<!>
|
||||
x[0]
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(vararg x: Int?) {
|
||||
x[0].apply {
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
x[0].also {
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>it<!>.inv()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun <T> case_3(vararg x: T?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Array<out T?> & kotlin.Array<out T?>")!>x<!>
|
||||
x[0]
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun <T : Number?> case_4(vararg x: T?) {
|
||||
x[0].apply {
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?!!")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?!!")!>this<!>.toByte()
|
||||
}
|
||||
}
|
||||
|
||||
x[0].also {
|
||||
if (it != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>it<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>it<!>.toByte()
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,734 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION, -NAME_SHADOWING, -UNUSED_VARIABLE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 16
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, properties, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Int?) {
|
||||
if (x == null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Unit?) {
|
||||
if (x === null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Nothing?) {
|
||||
if (x != null) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>.hashCode()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Number?) {
|
||||
if (x !== null) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Char?, y: Nothing?) {
|
||||
if (x != y) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Object?) {
|
||||
if (x !== implicitNullableNothingProperty) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Class?) {
|
||||
if (x === implicitNullableNothingProperty || false || false || false) { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Int?) {
|
||||
if (false || false || false || x == nullableNothingProperty) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: String?) {
|
||||
if (x != implicitNullableNothingProperty && true && true && true) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Float?) {
|
||||
if (true && true && true && x !== null) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Out<*>?) {
|
||||
if (x == null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: Map<Unit, Nothing?>?) {
|
||||
if (x === null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: Map<out Number, *>?) {
|
||||
if (x != null) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(x: MutableCollection<in Number>?) {
|
||||
if (x !== null) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: MutableCollection<out Nothing?>?, y: Nothing?) {
|
||||
if (x != y) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(x: Collection<Collection<Collection<Collection<Collection<Collection<Collection<*>>>>>>>?) {
|
||||
if (x !== implicitNullableNothingProperty) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(x: MutableMap<*, *>?) {
|
||||
if (x === implicitNullableNothingProperty || false) { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 18
|
||||
fun case_18(x: MutableMap<out Number, in Number>?) {
|
||||
if (false || false || false || x == nullableNothingProperty) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(x: Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Int>>>>>>>?) {
|
||||
if (x === implicitNullableNothingProperty && true) else { return }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>.hashCode()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20(x: Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Number>>>>>>>?) {
|
||||
if (true && true && true && x !== null) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun <T> case_21(x: T) {
|
||||
if (x == null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun <T> case_22(x: T?) {
|
||||
if (x === null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun <T> case_23(x: Inv<in T>?) {
|
||||
if (x !== null) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun <T> case_24(x: Inv<out T?>?, y: Nothing?) {
|
||||
if (x !== y && true) else return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(x: Int?) {
|
||||
val x = (l@ {
|
||||
if (x == null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(x: Unit?, y: List<*>) {
|
||||
y.forEach l@ {
|
||||
if (x === null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 27
|
||||
fun case_27(x: Nothing?) = (l@ {
|
||||
if (x != null) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>.hashCode()
|
||||
})()
|
||||
|
||||
// TESTCASE NUMBER: 28
|
||||
fun case_28(x: Number?) {
|
||||
{(l@ {
|
||||
if (x !== null) else { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
})()}()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 29
|
||||
fun case_29(x: Char?, y: Nothing?) = l@ {
|
||||
if (x != y) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 30
|
||||
fun case_30(x: Object?): Any {
|
||||
return (l@ {
|
||||
if (x !== implicitNullableNothingProperty) else { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 31
|
||||
fun case_31(x: Class?): Any {
|
||||
return l@ {
|
||||
if (x === implicitNullableNothingProperty || false || false || false) { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 32
|
||||
fun case_32(x: Any?) {
|
||||
case_32((l@ {
|
||||
if (false || false || false || x == nullableNothingProperty) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableAny()
|
||||
})())
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 33
|
||||
fun case_33(x: Any?) {
|
||||
case_33(l@ {
|
||||
if (x != implicitNullableNothingProperty && true && true && true) else { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableAny()
|
||||
})
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 34
|
||||
fun case_34(x: Float?) {
|
||||
(l@ {
|
||||
if (true && true && true && x !== null) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableAny()
|
||||
}).equals(l@ {
|
||||
if (true && true && true && x !== null) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableAny()
|
||||
})
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 35
|
||||
fun case_35(x: Any?) {
|
||||
case_35 l@ {
|
||||
if (x == null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 36
|
||||
fun case_36(x: Any?) {
|
||||
case_36 l@ {
|
||||
if (x === null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 37
|
||||
fun case_37(x: Any?): Any? = case_37 l@ {
|
||||
if (x === null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 38
|
||||
fun case_39(x: MutableCollection<in Number>?) {
|
||||
(l1@ {
|
||||
(l2@ {
|
||||
if (x !== null) else {
|
||||
return@l2
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 39
|
||||
fun case_39(x: MutableCollection<out Nothing?>?, y: Nothing?) {
|
||||
(l2@ {
|
||||
if (x != y) else return@l2
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 40
|
||||
fun case_40(x: Collection<Collection<Collection<Collection<Collection<Collection<Collection<*>>>>>>>?) {
|
||||
val z = (l@ {
|
||||
if (x !== implicitNullableNothingProperty) else { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 41
|
||||
fun case_41(x: MutableMap<*, *>?) {
|
||||
listOf(l@ {
|
||||
if (x === implicitNullableNothingProperty || false) { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableAny()
|
||||
})
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 42
|
||||
fun case_42(x: MutableMap<out Number, in Number>?) {
|
||||
return (l@ {
|
||||
if (false || false || false || x == nullableNothingProperty) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 43
|
||||
fun case_43(x: Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Int>>>>>>>?): Any? {
|
||||
return l@ {
|
||||
if (x === implicitNullableNothingProperty && true) else { return@l }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 44
|
||||
fun case_44(x: Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Number>>>>>>>?) {
|
||||
(l@ {
|
||||
if (true && true && true && x !== null) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableAny()
|
||||
}).invoke()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 45
|
||||
fun <T> case_45(x: T) {
|
||||
val y = (l@ {
|
||||
if (x == null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T!!")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 46
|
||||
fun <T> case_46(x: T?) {
|
||||
(l@ {
|
||||
if (x === null) return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?!!")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableAny()
|
||||
})()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 47
|
||||
fun <T> case_47(x: Inv<in T>?) {
|
||||
val y = l@ {
|
||||
if (x !== null) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 48
|
||||
fun <T> case_48(x: Inv<out T?>?, y: Nothing?) {
|
||||
val y = ((((l@ {
|
||||
if (x !== y && true) else return@l
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
}))))
|
||||
}
|
||||
@@ -0,0 +1,354 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 17
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, properties, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Int?) {
|
||||
if (x == null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Unit?) {
|
||||
if (x === null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Nothing?) {
|
||||
if (x != null) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Number?) {
|
||||
if (x !== null) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Char?, y: Nothing?) {
|
||||
if (x != y) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Object?) {
|
||||
if (x !== implicitNullableNothingProperty) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Class?) {
|
||||
if (x === implicitNullableNothingProperty || false || false || false) { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Int?) {
|
||||
if (false || false || false || x == nullableNothingProperty) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: String?) {
|
||||
if (x != implicitNullableNothingProperty && true && true && true) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Float?) {
|
||||
if (true && true && true && x !== null) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Out<*>?) {
|
||||
if (x == null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: Map<Unit, Nothing?>?) {
|
||||
if (x === null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?> & kotlin.collections.Map<kotlin.Unit, kotlin.Nothing?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: Map<out Number, *>?) {
|
||||
if (x != null) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(x: MutableCollection<in Number>?) {
|
||||
if (x !== null) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: MutableCollection<out Nothing?>?, y: Nothing?) {
|
||||
if (x != y) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<out kotlin.Nothing?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(x: Collection<Collection<Collection<Collection<Collection<Collection<Collection<*>>>>>>>?) {
|
||||
if (x !== implicitNullableNothingProperty) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<kotlin.collections.Collection<*>>>>>>>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(x: MutableMap<*, *>?) {
|
||||
if (x === implicitNullableNothingProperty || false) { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<*, *>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 18
|
||||
fun case_18(x: MutableMap<out Number, in Number>?) {
|
||||
if (false || false || false || x == nullableNothingProperty) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableMap<out kotlin.Number, in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(x: Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Int>>>>>>>?) {
|
||||
if (x === implicitNullableNothingProperty && true) else { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in Inv<in kotlin.Int>>>>>>>?")!>x<!>.hashCode()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20(x: Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Number>>>>>>>?) {
|
||||
if (true && true && true && x !== null) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>> & Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out Inv<out kotlin.Number>>>>>>>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun <T> case_21(x: T) {
|
||||
if (x == null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun <T> case_22(x: T?) {
|
||||
if (x === null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun <T> case_23(x: Inv<in T>?) {
|
||||
if (x !== null) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun <T> case_24(x: Inv<out T?>?, y: Nothing?) {
|
||||
if (x !== y && true) else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun <T> case_25(x: Inv<out T?>?, y: Nothing?) {
|
||||
if (x !== y) else try { throw Exception() } finally { throw Exception() }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
@@ -0,0 +1,420 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 18
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, properties, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Int?) {
|
||||
while (true) {
|
||||
if (x == null) break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Unit?) {
|
||||
while (true) {
|
||||
if (x === null) continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Nothing?, f: Boolean) {
|
||||
do {
|
||||
if (x != null) else break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>.hashCode()
|
||||
} while (f)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Number?) {
|
||||
for (i in 0..10) {
|
||||
if (x !== null) else { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Char?, y: Nothing?, f: Boolean) {
|
||||
do {
|
||||
if (x != y) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>.funNullableAny()
|
||||
} while (f)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Object?, f: Boolean) {
|
||||
while (f) {
|
||||
if (x !== implicitNullableNothingProperty) else { continue }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Class?, list: List<Int>) {
|
||||
for (element in list) {
|
||||
if (x === implicitNullableNothingProperty || false || false || false) { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Int?) {
|
||||
for (i in 0..10) {
|
||||
if (false || false || false || x == nullableNothingProperty) continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(list: List<Int?>) {
|
||||
for (element in list) {
|
||||
if (element != implicitNullableNothingProperty && true && true && true) else { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>element<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>element<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Float?) {
|
||||
while (false) {
|
||||
if (true && true && true && x !== null) else break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Out<*>?, list: List<Int>) {
|
||||
for (element in list) {
|
||||
if (x == null) continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(list: List<Int?>) {
|
||||
for (element in list) {
|
||||
if (element === null) continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>element<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>element<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: Map<out Number, *>?) {
|
||||
do {
|
||||
if (x != null) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map<out kotlin.Number, *> & kotlin.collections.Map<out kotlin.Number, *>?")!>x<!>.funNullableAny()
|
||||
} while (false)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(x: MutableCollection<in Number>?, r: IntRange) {
|
||||
for (i in r) {
|
||||
if (x !== null) else { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableCollection<in kotlin.Number> & kotlin.collections.MutableCollection<in kotlin.Number>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(map: MutableMap<Int?, Int?>, y: Nothing?) {
|
||||
for ((k, v) in map) {
|
||||
if (k != y) else break
|
||||
if (v != y) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>k<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>k<!>.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>v<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>v<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(map: Map<Int?, Int?>) {
|
||||
for ((k, v) in map) {
|
||||
if (k !== implicitNullableNothingProperty && v !== implicitNullableNothingProperty) else { continue }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>k<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>k<!>.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>v<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>v<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun <T>case_17(x: T?, f: Boolean) {
|
||||
while (f) {
|
||||
if (x === implicitNullableNothingProperty || false) { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 18
|
||||
fun <T>case_18(x: T, f: Boolean) {
|
||||
while (f) {
|
||||
if (false || false || false || x == nullableNothingProperty) break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun <K, V>case_19(map: MutableMap<K, V>, y: Nothing?) {
|
||||
for ((k, v) in map) {
|
||||
if (k !== implicitNullableNothingProperty && true && v != y) else { break }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K")!>k<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V")!>v<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun <K, V: K>case_20(map: MutableMap<K?, V>) {
|
||||
for ((k, v) in map) {
|
||||
if (true && true && true && k !== null && v != null && true) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("V!! & V")!>v<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun <K, V>case_21(map: MutableMap<out K?, in V>) {
|
||||
for ((k, v) in map) {
|
||||
if (k == null) continue
|
||||
if (v === null || false) break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>k<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>v<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun <T> case_22(x: T?) {
|
||||
while (true) {
|
||||
if (x === null) break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun <T> case_23(x: Inv<in T>?) {
|
||||
for (i in -10..10) {
|
||||
if (x !== null) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<in T> & Inv<in T>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun <T> case_24(x: Inv<out T?>?, y: Nothing?) {
|
||||
do {
|
||||
if (x !== y && true) else continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
} while (true)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun <T> case_25(x: Inv<out T?>?, y: Nothing?, z: List<Int>) {
|
||||
for (i in z) {
|
||||
if (x !== y) else try {
|
||||
break
|
||||
} finally {
|
||||
continue
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out T?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 19
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any) {
|
||||
if (x is Unit) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Any")!>x<!>.toString()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x !is Class) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any) {
|
||||
if (x !is EnumClass) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>.fun_1()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (!(x !is Class.NestedClass?)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>?.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
if (!(x !is Object)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (!(x is Int?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>?.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (!!(x !is TypealiasNullableStringIndirect?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>?.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
if (!!(x !is Interface3)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>.itest3()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
if (x is SealedMixedChildObject1?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>?.prop_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>?.prop_2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,506 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, enumClasses, properties, functions
|
||||
*/
|
||||
|
||||
// FILE: other_package.kt
|
||||
|
||||
package otherpackage
|
||||
|
||||
// TESTCASE NUMBER: 8, 16
|
||||
class Case8_16__1 {}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
import otherpackage.*
|
||||
|
||||
// TESTCASE NUMBER: 8, 16
|
||||
class Case8_16__2 {
|
||||
val x: otherpackage.Case8_16__1?
|
||||
init {
|
||||
x = otherpackage.Case8_16__1()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x != null || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(a: DeepObject.A.B.C.D.E.F.G.J?) =
|
||||
if (false || a != null == true == false == false == false == true == false == true == false == false == true == true || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
} else -1
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28328
|
||||
*/
|
||||
fun case_3(b: Boolean) {
|
||||
val x = {
|
||||
if (b) object {
|
||||
val a = 10
|
||||
} else null
|
||||
}
|
||||
|
||||
val y = if (b) x else null
|
||||
|
||||
if (false || false || false || false || y !== null) {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!><!INAPPLICABLE_CANDIDATE!>y<!>()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funNullableAny()
|
||||
|
||||
if (z != null || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.<!UNRESOLVED_REFERENCE!>a<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(a: ((Float) -> Int?)?, b: Float?) {
|
||||
if (a != null == true && b != null == true || false || false || false || false || false || false || false || false || false) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!><!INAPPLICABLE_CANDIDATE!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!>)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funNullableAny()
|
||||
|
||||
if (false || x != null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(b: Boolean) {
|
||||
val a = if (b) {
|
||||
object {
|
||||
val B5 = if (b) {
|
||||
object {
|
||||
val C5 = if (b) {
|
||||
object {
|
||||
val D5 = if (b) {
|
||||
object {
|
||||
val x: Number? = 10
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
|
||||
if (a != null && a.B5 != null && a.B5.C5 != null && a.B5.C5.D5 != null && a.B5.C5.D5.x != null && b || false) {
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.equals(null)
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propT<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.propAny
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propNullableT<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.propNullableAny
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funT<!>()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.funAny()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funNullableT<!>()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B5<!>.<!UNRESOLVED_REFERENCE!>C5<!>.<!UNRESOLVED_REFERENCE!>D5<!>.<!UNRESOLVED_REFERENCE!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(z: Boolean?) {
|
||||
if (false || EnumClassWithNullableProperty.B.prop_1 != null && z != null && z) {
|
||||
EnumClassWithNullableProperty.B.prop_1
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
EnumClassWithNullableProperty.B.prop_1.propT
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
EnumClassWithNullableProperty.B.prop_1.propNullableT
|
||||
EnumClassWithNullableProperty.B.prop_1.propNullableAny
|
||||
EnumClassWithNullableProperty.B.prop_1.funT()
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
EnumClassWithNullableProperty.B.prop_1.funNullableT()
|
||||
EnumClassWithNullableProperty.B.prop_1.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(a: DeepObject.A.B.C.D.E.F.G.J?) {
|
||||
val g = false
|
||||
|
||||
if (a != null && g) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_8(b: Boolean, c: Boolean?) {
|
||||
val a = Case8_16__2()
|
||||
|
||||
if (a.x !== null && false) {
|
||||
if (false || false || false || false || a.x != null || false || false || false) {
|
||||
if (a.x !== null && true) {
|
||||
if (a.x != null && b) {
|
||||
if (a.x != null && b && !b) {
|
||||
if (a.x != null && c != null && !c) {
|
||||
if (a.x !== null && c) {
|
||||
if (a.x != null && b && b && b && b && b && b && b && b && b && b && b) {
|
||||
if (a.x != null && !b && !b && !b && !b && !b && !b && !b && !b && !b) {
|
||||
if (a.x !== null && null == null) {
|
||||
if (a.x != null && null!!) {
|
||||
if (a.x != null) {
|
||||
if (a.x != null) {
|
||||
if (a.x !== null) {
|
||||
if (a.x != null) {
|
||||
if (a.x !== null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (x == null || false || false || false || false || false || false) {
|
||||
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(a: DeepObject.A.B.C.D.E.F.G.J?) =
|
||||
if (a == null == true == false == false == false == true == false == true == false == false == true == true && true) {
|
||||
-1
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28328
|
||||
*/
|
||||
fun case_11(b: Boolean) {
|
||||
val x = {
|
||||
if (b) object {
|
||||
val a = 10
|
||||
} else null
|
||||
}
|
||||
|
||||
val y = if (b) x else null
|
||||
|
||||
if (y === null && true) else {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!><!INAPPLICABLE_CANDIDATE!>y<!>()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<anonymous?>?")!>y<!>.funNullableAny()
|
||||
|
||||
if (z != null || b) {
|
||||
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(a: ((Float) -> Int?)?, b: Float?, c: Boolean?) {
|
||||
if (true && a == null == true || b == null == true) {
|
||||
|
||||
} else {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!><!INAPPLICABLE_CANDIDATE!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float")!>b<!>)<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Float?")!>b<!>.funNullableAny()
|
||||
if (x == null == true || (c != null && !c)) {
|
||||
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(b: Boolean, c: Boolean, d: Boolean) {
|
||||
val a = if (b) {
|
||||
object {
|
||||
val B19 = if (b) {
|
||||
object {
|
||||
val C19 = if (b) {
|
||||
object {
|
||||
val D19 = if (b) {
|
||||
object {
|
||||
val x: Number? = 10
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
|
||||
if ((a == null || a.B19 == null || a.B19.C19 == null || a.B19.C19.D19 == null || a.B19.C19.D19.x == null || b || c || !d) && true) {
|
||||
|
||||
} else {
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.equals(null)
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propT<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.propAny
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propNullableT<!>
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.propNullableAny
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funT<!>()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.funAny()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funNullableT<!>()
|
||||
a.<!INAPPLICABLE_CANDIDATE!>B19<!>.<!UNRESOLVED_REFERENCE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_14(z: Boolean?) {
|
||||
if (true && true && true && true && EnumClassWithNullableProperty.B.prop_1 != null || z != null || z!! && true && true) {
|
||||
|
||||
} else {
|
||||
EnumClassWithNullableProperty.B.prop_1
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
EnumClassWithNullableProperty.B.prop_1.propT
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
EnumClassWithNullableProperty.B.prop_1.propNullableT
|
||||
EnumClassWithNullableProperty.B.prop_1.propNullableAny
|
||||
EnumClassWithNullableProperty.B.prop_1.funT()
|
||||
EnumClassWithNullableProperty.B.prop_1.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
EnumClassWithNullableProperty.B.prop_1.funNullableT()
|
||||
EnumClassWithNullableProperty.B.prop_1.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(a: DeepObject.A.B.C.D.E.F.G.J?) {
|
||||
val g = false
|
||||
|
||||
if (true && a != null || g || !g || true || !true) {
|
||||
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(b: Boolean, c: Boolean?) {
|
||||
val a = Case8_16__2()
|
||||
|
||||
if (a.x != null && false && false && false && false && false && false) {
|
||||
if ( a.x == null || false) {
|
||||
} else {
|
||||
if ( a.x === null && true) {
|
||||
} else {
|
||||
if (a.x == null || !b) {
|
||||
} else {
|
||||
if (a.x == null || b || !b) {
|
||||
} else {
|
||||
if (a.x == null || c == null || !c) {
|
||||
} else {
|
||||
if (a.x === null || c) {
|
||||
} else {
|
||||
if (a.x == null || b || b || b || b || b || b || b || b || b || b || b) {
|
||||
} else {
|
||||
if (a.x == null || !b || !b || !b || !b || !b || !b || !b || !b || !b) {
|
||||
} else {
|
||||
if (a.x === null || null == null) {
|
||||
} else {
|
||||
if (a.x == null || null!!) {
|
||||
} else {
|
||||
if (a.x == null) {
|
||||
} else {
|
||||
if (a.x == null) {
|
||||
} else {
|
||||
if (a.x === null) {
|
||||
} else {
|
||||
if (a.x == null) {
|
||||
} else {
|
||||
if (a.x === null) {
|
||||
} else {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(a: Int?, b: Int = if (a != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 18
|
||||
fun case_18(a: Int?, b: Int = if (false || a != null || false) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableAny()
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 20
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any) {
|
||||
if (x is Unit || false || false || false || false || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>.toString()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (true && x !is Class) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>prop_1<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_4(x: Any) {
|
||||
if (true && true && x !is EnumClass) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>.<!UNRESOLVED_REFERENCE!>fun_1<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (false || !(x !is Class.NestedClass?)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>prop_4<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_6(x: Any?) {
|
||||
if (false || false || !(x !is Object)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>prop_1<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J) && true && true && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>.<!UNRESOLVED_REFERENCE!>prop_1<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (!(x is Int?) && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_9(x: Any?) {
|
||||
if (true && true && !!(x !is TypealiasNullableStringIndirect?) && true && true && true && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>get<!>(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
if (true && !!(x !is Interface3) && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest3<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
if (false || x is SealedMixedChildObject1? || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>prop_1<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>prop_2<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 21
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_2(x: Any) {
|
||||
if (x is Int === true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x !is Class == true == true == true == true == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any) {
|
||||
if (x !is EnumClass != false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>.fun_1()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (!(x !is Class.NestedClass?) != false == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>?.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
if (!(x !is Object) != false != false != false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_7(x: Any) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J) !== false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_8(x: Any?) {
|
||||
if (!(x is Int?) !== false !== false !== false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>?.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_9(x: Any?) {
|
||||
if (!!(x !is TypealiasNullableStringIndirect?) !== false === true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>?.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_10(x: Any?) {
|
||||
if (!!(x !is Interface3) === true && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest3<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
if (x is SealedMixedChildObject1? != false || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>prop_1<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>prop_2<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 22
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int) {
|
||||
if (x !is Int) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any) {
|
||||
if (x !is Unit) {
|
||||
if (x is Unit) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Any")!>x<!>.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x !is Class) {
|
||||
if (x !is Class) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any) {
|
||||
if (x !is EnumClass) else {
|
||||
if (x !is EnumClass) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & kotlin.Any")!>x<!>.fun_1()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (!(x !is Class.NestedClass?)) {
|
||||
if (!!(x !is Class.NestedClass?)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass? & kotlin.Any?")!>x<!>?.prop_4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
if (!(x is Object)) {
|
||||
if (!(x !is Object)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Object & kotlin.Any?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J)) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Any")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (!!!!(x is Int?)) else {
|
||||
if (!(x is Int?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Any?")!>x<!>?.inv()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (!!!(x !is TypealiasNullableStringIndirect?)) else {
|
||||
if (!!(x !is TypealiasNullableStringIndirect?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect? & kotlin.Any?")!>x<!>?.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
if (!!(x is Interface3)) else {
|
||||
if (!!(x !is Interface3)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & kotlin.Any?")!>x<!>.itest3()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
if (x is SealedMixedChildObject1?) {
|
||||
if (x is SealedMixedChildObject1?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>?.prop_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1? & kotlin.Any?")!>x<!>?.prop_2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
inline fun <reified T, reified K>case_12(x: Any?) {
|
||||
if (x is T) {
|
||||
if (x is T is K) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
inline fun <reified T, reified K>case_13(x: Any?) {
|
||||
if (x is T) {
|
||||
if (x is K) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & K!! & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
inline fun <reified T, reified K>case_14(x: Any?) {
|
||||
if (x is T) {
|
||||
if (x !is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
inline fun <reified T, reified K>case_15(x: Any?) {
|
||||
if (x !is T) {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 23
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
class Case1<T : Number> {
|
||||
inline fun <reified T : CharSequence>case_1(x: Any?) {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun <T> case_2() where T: CharSequence, T: Number {
|
||||
class Case1<K> where K : T {
|
||||
inline fun <reified T : K> case_1(x: Any?) {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun <T> case_3(x: Any?) where T: CharSequence, T: Number {
|
||||
class Case1<K> where K : T {
|
||||
inline fun <reified T : K> case_1() {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 24
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun <T> case_1(x: Any?) where T: CharSequence {
|
||||
x as T
|
||||
class Case1<K> where K : T {
|
||||
inline fun <reified T : Number> case_1() {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & T & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 25
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
open class Case1<K : Number> {
|
||||
open inner class Case1_1<L>: Case1<Int>() where L : CharSequence {
|
||||
inner class Case1_2<M>: Case1<K>.Case1_1<M>() where M : Map<K, L> {
|
||||
inline fun <reified T>case_1(x: Any?) {
|
||||
x as M
|
||||
x as L
|
||||
x as K
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.<!AMBIGUITY!>get<!>(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.isEmpty()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>[null]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
inline fun <reified T : CharSequence>case_2(x: Any?) {
|
||||
x as T
|
||||
if (x !is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
inline fun <reified T : CharSequence>case_3(x: Any?) {
|
||||
x as T?
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
inline fun <reified T : CharSequence>case_4(x: Any?) {
|
||||
(x as? T)!!
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>get<!>(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
inline fun <reified T : CharSequence>case_5(x: Any?) {
|
||||
if (x as? T != null) {
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 26
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
open class Case1<K : Number> {
|
||||
open inner class Case1_1<L>: Case1<Int>() where L : CharSequence {
|
||||
inner class Case1_2<M>: Case1<K>.Case1_1<M>() where M : Map<K, L> {
|
||||
inline fun <reified T>case_1(x: Any?) {
|
||||
x as M
|
||||
x as L
|
||||
x as K
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.<!AMBIGUITY!>get<!>(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.isEmpty()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>[null]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
inline fun <reified T : CharSequence>case_2(x: Any?) {
|
||||
x as T
|
||||
if (x !is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
inline fun <reified T : CharSequence>case_3(x: Any?) {
|
||||
x as T?
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
inline fun <reified T : CharSequence>case_4(x: Any?) {
|
||||
(x as? T)!!
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>get<!>(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
inline fun <reified T : CharSequence>case_5(x: Any?) {
|
||||
if (x as? T != null) {
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 27
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
open class Case1<K : Number> {
|
||||
open inner class Case1_1<L>: Case1<Int>() where L : CharSequence {
|
||||
inner class Case1_2<M>: Case1<K>.Case1_1<M>() where M : Map<K, L> {
|
||||
inline fun <reified T>case_1(x: Any?) {
|
||||
x as M
|
||||
x as L
|
||||
x as K
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.<!AMBIGUITY!>get<!>(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.size
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>.isEmpty()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("M & L & K & T!! & kotlin.Any?")!>x<!>[null]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
inline fun <reified T : CharSequence>case_2(x: Any?) {
|
||||
x as T
|
||||
if (x !is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
inline fun <reified T : CharSequence>case_3(x: Any?) {
|
||||
x as T?
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
inline fun <reified T : CharSequence>case_4(x: Any?) {
|
||||
(x as? T)!!
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>get<!>(0)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
inline fun <reified T : CharSequence>case_5(x: Any?) {
|
||||
if (x as? T != null) {
|
||||
if (x is T?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & kotlin.Any?")!>x<!>.get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,358 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 28
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Int?) {
|
||||
if (x?.inv() != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Int?) {
|
||||
if (x?.inv() == null) else if (true) {} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Boolean?) {
|
||||
if (x?.not() == null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: EnumClass?) {
|
||||
if (x?.fun_1() !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & EnumClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EnumClass & EnumClass?")!>x<!>.fun_1()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Class.NestedClass?) {
|
||||
if (x?.prop_4 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Class.NestedClass?) {
|
||||
if (!(x?.prop_4 == null)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: DeepObject.A.B.C.D.E.F.G.J?) {
|
||||
if (!!(x?.prop_1 != null)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>x<!>.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x?.equals(10) === null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (x?.equals(10) !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_10(x: Interface3?) {
|
||||
if (x?.itest() == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface3?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface3?")!>x<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface3?")!>x<!>.itest3()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_11(x: SealedMixedChildObject1?) {
|
||||
if (x?.prop_1 != null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1 & SealedMixedChildObject1?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1 & SealedMixedChildObject1?")!>x<!>.prop_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("SealedMixedChildObject1 & SealedMixedChildObject1?")!>x<!>.prop_2
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
inline fun <reified T>case_12(x: Any?) {
|
||||
if (x?.equals(10) != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
inline fun <reified T>case_13(x: Any?) {
|
||||
if (x?.equals(10) == null) {} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
inline fun <reified T>case_14(x: Any?) {
|
||||
if (x?.equals(10) === null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
inline fun <reified T>case_15(x: Any?) {
|
||||
if (x?.equals(10) !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 16
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262
|
||||
*/
|
||||
inline fun <reified T>case_16(x: Any?) {
|
||||
if (x?.equals(10) === null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 17
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262
|
||||
*/
|
||||
inline fun <reified T>case_17(x: Any?) {
|
||||
if (x?.equals(10) !== null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 18
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_18(x: Any?) {
|
||||
if (x?.equals(10) === null === true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 19
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_19(x: Any?) {
|
||||
if (x?.equals(10) !== null === true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 20
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_20(x: Any?) {
|
||||
if (x?.equals(10) === null !== false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 21
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_21(x: Any?) {
|
||||
if (x?.equals(10) !== null !== false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 22
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_22(x: Any?) {
|
||||
if (x?.equals(10) !== null !== true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 23
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_23(x: Any?) {
|
||||
if (x?.equals(10) === null === false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 24
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262
|
||||
*/
|
||||
inline fun <reified T>case_24(x: Any?) {
|
||||
if (x?.equals(10) !== null != true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 25
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-28262
|
||||
*/
|
||||
inline fun <reified T>case_25(x: Any?) {
|
||||
if (x?.equals(10) === null == false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 26
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_26(x: Any?) {
|
||||
if (x?.equals(10) != null === false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 27
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_27(x: Any?) {
|
||||
if (x?.equals(10) == null === false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 28
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
inline fun <reified T>case_28(x: Any?) {
|
||||
if (x?.equals(10) != null == false) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 29
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
inline fun <reified T>case_29(x: Any?) {
|
||||
if (x?.equals(10) == null == false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 30
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_30(x: Class.NestedClass?) {
|
||||
if (x?.prop_4 != null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 31
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_31(x: Class.NestedClass?) {
|
||||
if (!(x?.prop_4 == null) != false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 32
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_32(x: Class.NestedClass?) {
|
||||
if (x?.prop_4 == null == false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 33
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_33(x: Class.NestedClass?) {
|
||||
if (!(x?.prop_4 != null) != true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class.NestedClass & Class.NestedClass?")!>x<!>.prop_4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 29
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, properties, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8?.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8?.prop_8 !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8?.prop_8 == null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30369
|
||||
*/
|
||||
fun case_4(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun <T> case_5(x: T) {
|
||||
if (x?.propNullableT != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun <T>case_6(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_2 != null) {
|
||||
x.prop_1.prop_1.prop_1.prop_2
|
||||
x.prop_1.prop_1.prop_1.prop_2.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
inline fun <reified T>case_7(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_2 == null) else {
|
||||
x.prop_1.prop_1.prop_1.prop_2
|
||||
x.prop_1.prop_1.prop_1.prop_2.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun <T>case_8(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_1 == null) else {
|
||||
x.prop_1.prop_1.prop_1.prop_1
|
||||
x.prop_1.prop_1.prop_1.prop_1.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
inline fun <reified T>case_9(x: Out<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_1 != null) {
|
||||
x.prop_1.prop_1.prop_1.prop_1
|
||||
x.prop_1.prop_1.prop_1.prop_1.equals(10)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, enumClasses, classes, properties, typealiases
|
||||
*/
|
||||
|
||||
// FILE: other_package.kt
|
||||
|
||||
package otherpackage
|
||||
|
||||
// TESTCASE NUMBER: 13, 14
|
||||
class EmptyClass13_14 {}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
import otherpackage.*
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Nothing?) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
if (Object.prop_1 != null)
|
||||
else {
|
||||
Object.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Char?) {
|
||||
if (x == null && true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x: Unit? = null
|
||||
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: EmptyClass?) {
|
||||
val y = true
|
||||
|
||||
if (x == null && !y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
if (nullableStringProperty == null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>nullableStringProperty<!> == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>nullableStringProperty<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasNullableString) {
|
||||
if (x == null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!>
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_9(x: TypealiasNullableString?) {
|
||||
if (true && true && true && true && x !== null) {
|
||||
|
||||
} else if (false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10() {
|
||||
val a = Class()
|
||||
|
||||
if (a.prop_4 != null || true) {
|
||||
if (a.prop_4 == null) {
|
||||
a.prop_4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: TypealiasNullableString?, y: TypealiasNullableString) {
|
||||
val z: TypealiasNullableString = null
|
||||
|
||||
if (x != null) {
|
||||
|
||||
} else {
|
||||
if (y == null) {
|
||||
if (nullableStringProperty != null) {
|
||||
if (z == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: TypealiasNullableString, y: TypealiasNullableString) = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>if (x != null && true && true && true) "1"
|
||||
else if (y != null) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!>
|
||||
else "-1"<!>
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: otherpackage.EmptyClass13_14?) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("otherpackage.EmptyClass13_14?")!>if (x != null && true) {
|
||||
throw Exception()
|
||||
} else <!DEBUG_INFO_EXPRESSION_TYPE("otherpackage.EmptyClass13_14?")!>x<!><!>
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
class Case14 {
|
||||
val x: otherpackage.EmptyClass13_14?
|
||||
init {
|
||||
x = otherpackage.EmptyClass13_14()
|
||||
}
|
||||
}
|
||||
|
||||
fun case_14() {
|
||||
val a = Case14()
|
||||
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
a.x
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: TypealiasNullableString) {
|
||||
val t = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>if (x != null) "" else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
|
||||
if (x == null || false || false || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>if (nullableIntProperty !== null) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>nullableIntProperty<!>
|
||||
}<!>
|
||||
|
||||
//TESTCASE NUMBER: 18
|
||||
fun case_18(a: DeepObject.A.B.C.D.E.F.G.J?) {
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(b: Boolean) {
|
||||
val a = if (b) {
|
||||
object {
|
||||
val B19 = if (b) {
|
||||
object {
|
||||
val C19 = if (b) {
|
||||
object {
|
||||
val D19 = if (b) {
|
||||
object {
|
||||
val x: Number? = 10
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
|
||||
if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) {
|
||||
a.B19.C19.D19.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20(b: Boolean) {
|
||||
val a = object {
|
||||
val B19 = object {
|
||||
val C19 = object {
|
||||
val D19 = if (b) {
|
||||
object {}
|
||||
} else null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a.B19.C19.D19 == null) {
|
||||
a.B19.C19.D19
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21() {
|
||||
if (EnumClassWithNullableProperty.B.prop_1 == null) {
|
||||
EnumClassWithNullableProperty.B.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(a: (() -> Unit)?) {
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(a: ((Float) -> Int?)?, b: Float?) {
|
||||
if (a == null && b == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!>
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?> & kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 24
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_24(a: ((() -> Unit) -> Unit)?, b: (() -> Unit)?) {
|
||||
if (false || false || a == null && b === null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(b: Boolean) {
|
||||
val x = {
|
||||
if (b) object {
|
||||
val a = 10
|
||||
} else null
|
||||
}
|
||||
|
||||
val y = if (b) x else null
|
||||
|
||||
if (y != null) {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("anonymous?")!>y()<!>
|
||||
|
||||
if (z == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("anonymous?")!>z<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: Int?, b: Int? = if (a !== null) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>b<!>
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 30
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, properties, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_1(x: Class?) {
|
||||
if (x!!.prop_8?.prop_8?.prop_8?.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_2(x: Class?) {
|
||||
if (x?.prop_8!!.prop_8?.prop_8?.prop_8 !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_3(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8!!.prop_8 == null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_4(x: Class?) {
|
||||
if (x!!?.prop_8?.prop_8?.prop_8?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_5(x: Class?) {
|
||||
if (x?.prop_8!!?.prop_8?.prop_8?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_6(x: Class?) {
|
||||
if (x?.prop_8?.prop_8?.prop_8!!?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_7(x: Class) {
|
||||
if (x!!.prop_8?.prop_8?.prop_8?.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_8(x: Class) {
|
||||
if (x!!.prop_8?.prop_8?.prop_8?.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
// TESTCASE NUMBER: 9
|
||||
fun <T> case_9(x: T) {
|
||||
if (x!!.propNullableT != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>
|
||||
x.propNullableT
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun <T>case_10(x: Inv<T>?) {
|
||||
if (x!!.prop_1?.prop_1?.prop_1?.prop_2 != null) {
|
||||
x.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_2<!>
|
||||
x.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_2<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
inline fun <reified T>case_11(x: Inv<T>?) {
|
||||
if (x?.prop_1!!.prop_1?.prop_1?.prop_2 == null) else {
|
||||
x.prop_1.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_2<!>
|
||||
x.prop_1.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>.<!UNRESOLVED_REFERENCE!>prop_2<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun <T>case_12(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1!!.prop_1 == null) else {
|
||||
x.prop_1.prop_1.prop_1.prop_1
|
||||
x.prop_1.prop_1.prop_1.prop_1.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
inline fun <reified T>case_13(x: Out<T>?) {
|
||||
if (x?.prop_1?.prop_1!!.prop_1?.prop_1 != null) {
|
||||
x.prop_1.prop_1.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>
|
||||
x.prop_1.prop_1.prop_1.<!INAPPLICABLE_CANDIDATE!>prop_1<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 31
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, properties, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
if ((x as Class).prop_8?.prop_8?.prop_8?.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_2(x: Class?) {
|
||||
if ((x as Class).prop_8?.prop_8?.prop_8?.prop_8 !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_3(x: Any?) {
|
||||
if ((x as Class?)?.prop_8?.prop_8?.prop_8?.prop_8 == null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_4(x: Any?) {
|
||||
if ((x as Class?)!!.prop_8?.prop_8?.prop_8?.prop_8 == null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_5(x: Class?) {
|
||||
if ((x?.prop_8 as Class).prop_8?.prop_8?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_6(x: Class?) {
|
||||
if ((x?.prop_8?.prop_8?.prop_8 as Class?)?.prop_8 == null == true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>.prop_8.prop_8.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>.<!UNRESOLVED_REFERENCE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun <T> case_5(x: T) {
|
||||
if ((x as Any).propNullableT != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T!! & T")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun <T>case_6(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_2 != null) {
|
||||
x.prop_1.prop_1.prop_1.prop_2
|
||||
x.prop_1.prop_1.prop_1.prop_2.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
inline fun <reified T>case_7(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_2 == null) else {
|
||||
x.prop_1.prop_1.prop_1.prop_2
|
||||
x.prop_1.prop_1.prop_1.prop_2.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun <T>case_8(x: Inv<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_1 == null) else {
|
||||
x.prop_1.prop_1.prop_1.prop_1
|
||||
x.prop_1.prop_1.prop_1.prop_1.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
inline fun <reified T>case_9(x: Out<T>?) {
|
||||
if (x?.prop_1?.prop_1?.prop_1?.prop_1 != null) {
|
||||
x.prop_1.prop_1.prop_1.prop_1
|
||||
x.prop_1.prop_1.prop_1.prop_1.equals(10)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 32
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun <T: Any, K: Any> case_1(x: T?, y: K?) {
|
||||
x as T
|
||||
y as K
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!> ?: <!DEBUG_INFO_EXPRESSION_TYPE("K?!!")!>y<!>
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>z<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
inline fun <reified T: Any, reified K: T> case_2(y: K?) {
|
||||
y as K
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("K?!! & K?")!>y<!>.equals(10)
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 33
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
var x: Any? = null
|
||||
|
||||
if (true) {
|
||||
x = 42
|
||||
} else {
|
||||
x = 42
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2() {
|
||||
val x: Any?
|
||||
|
||||
if (true) {
|
||||
x = 42
|
||||
} else {
|
||||
x = 42.0
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Double> & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
var x: Any? = null
|
||||
|
||||
if (true) {
|
||||
x = ClassLevel2()
|
||||
} else {
|
||||
x = ClassLevel3()
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
val x: Any?
|
||||
|
||||
if (true) {
|
||||
return
|
||||
} else {
|
||||
x = 42.0
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Double & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Double & kotlin.Any?")!>x<!>.minus(10.0)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x: Any?
|
||||
|
||||
if (true) {
|
||||
throw Exception()
|
||||
} else {
|
||||
x = 42.0
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Double & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Double & kotlin.Any?")!>x<!>.minus(10.0)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-35668
|
||||
*/
|
||||
fun case_6() {
|
||||
val x: Any?
|
||||
|
||||
if (true) {
|
||||
x = 42.0
|
||||
} else {
|
||||
null!!
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!AMBIGUITY!>minus<!>(10.0)
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 34
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
var a: Any? = null
|
||||
if (a == null) return
|
||||
val b = select(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>)
|
||||
val c = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>c<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>c<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>b<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(a: Any?) {
|
||||
if (a is String) {
|
||||
val b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(a: Any?) {
|
||||
if (a is String) {
|
||||
val b = a
|
||||
val c = b
|
||||
val d = c
|
||||
val e = d
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>e<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>e<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(a: Any?) {
|
||||
if (a is ClassLevel1) {
|
||||
val b = a
|
||||
if (b is ClassLevel2) {
|
||||
val c = b
|
||||
if (c is ClassLevel3) {
|
||||
val d = c
|
||||
if (d is ClassLevel4) {
|
||||
val e = d
|
||||
if (e is ClassLevel5) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & ClassLevel4")!>e<!>.test5()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* DISCUSSION: Smartcast due to `e as? ClassLevel5 ?: e as ClassLevel5`
|
||||
* ISSUES: KT-30503
|
||||
*/
|
||||
fun case_5(a: Any?) {
|
||||
val b: Any?
|
||||
val c: Any?
|
||||
val d: Any?
|
||||
val e: Any?
|
||||
if (
|
||||
a is ClassLevel1
|
||||
&& if (true) {b = a; false} else {b = a;true}
|
||||
&& b as ClassLevel2 is ClassLevel2
|
||||
&& if (true) {c = b;false} else {c = b;false}
|
||||
&& try {c as ClassLevel3;true} finally {c as ClassLevel3;false}
|
||||
&& when (true) {else -> {d = c;true}}
|
||||
&& when (true) {else -> {d as ClassLevel4;false}}
|
||||
&& if (true) {e = d;false} else {e = d;true}
|
||||
&& if (true) {e as? ClassLevel5 ?: e as ClassLevel5;true} else {e as? ClassLevel5 ?: e as ClassLevel5;false}
|
||||
) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>e<!>.test5()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_6() {
|
||||
val b: Any?
|
||||
val c: Any?
|
||||
val d: Any?
|
||||
val e: Any?
|
||||
|
||||
when (if (true) {b = 11} else {b = 12}) {
|
||||
when (if (true) {b.inv(); c = b; c as ClassLevel1;} else {b.inv(); c = b; c as ClassLevel1;}) {
|
||||
else -> kotlin.Unit
|
||||
} -> when (if (true) {c.test1(); d = c; d as ClassLevel2} else {c.test1(); d = c; d as ClassLevel2}) {
|
||||
when (if (true) {d.test2(); e = d; e as ClassLevel3} else {d.test2(); e = d; e as ClassLevel3}) {
|
||||
else -> ClassLevel2()
|
||||
} -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.inv())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test1())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test2())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test3())
|
||||
}
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.inv())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test1())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test2())
|
||||
println(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & ClassLevel3 & kotlin.Any?")!>e<!>.test3())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
fun case_7() {
|
||||
val d = ClassLevel1()
|
||||
var e: Any?
|
||||
|
||||
e = d
|
||||
e as ClassLevel2
|
||||
e = d
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & kotlin.Any?")!>e<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & kotlin.Any?")!>e<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & kotlin.Any?")!>e<!>.test2()
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 35
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
while (true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!> ?: return
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any?) {
|
||||
while (true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!> ?: return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756, KT-35668
|
||||
*/
|
||||
fun case_3(x: Any?) {
|
||||
while (true) {
|
||||
x ?: return ?: <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
while (true) {
|
||||
x ?: break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
while (true) {
|
||||
x ?: continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
do {
|
||||
x ?: continue
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
} while (false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any?) {
|
||||
do {
|
||||
x ?: break
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
} while (false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 36
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, functions, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
var a: Any? = null
|
||||
|
||||
if (a == null) return
|
||||
|
||||
val b = select(a)
|
||||
val c = a
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>b<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>c<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>c<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any) {
|
||||
if (x is String) {
|
||||
val y = x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>y<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x is Number?) {
|
||||
var y = x
|
||||
if (y == null) throw Exception()
|
||||
var z = y
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number")!>z<!>.toByte()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
if (x is Number?) {
|
||||
var y = x
|
||||
while (true && y != null) {
|
||||
var z = y
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number")!>z<!>.toByte()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
var y = x
|
||||
while (false || y != null) {
|
||||
if (y is Number) {
|
||||
val z = select(y)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>y<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>z<!>.toByte()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-35668
|
||||
*/
|
||||
fun case_6(x: Any?) {
|
||||
var y = x ?: null!!
|
||||
while (false || y is Number) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.<!UNRESOLVED_REFERENCE!>toByte<!>()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* ISSUES: KT-35668
|
||||
*/
|
||||
fun case_7(x: Any?, z: Any) {
|
||||
var y = x ?: null!!
|
||||
while (false || y === z) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* ISSUES: KT-35668
|
||||
*/
|
||||
fun case_8(x: Any?, z: Any) {
|
||||
var y = x ?: null!!
|
||||
y == z || return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?, z: Any) {
|
||||
var y = select(x) ?: return null!!
|
||||
z == y || throw null!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-35668
|
||||
*/
|
||||
fun case_10(x: Any?, z: Any, b: Boolean?) {
|
||||
var y = x ?: when (b) {
|
||||
true -> null!!
|
||||
false -> return
|
||||
null -> throw Exception()
|
||||
}
|
||||
z === y || if (b == true) return else if (b === false) null!! else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?, z: Any, b: Boolean?) {
|
||||
while (true) {
|
||||
var y = x ?: if (b == true) continue!! else if (!(b != false)) return else break ?: break::class
|
||||
z !== y && if (b == true) return else if (b === false) null!!else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: Any?, z: Any, b: Boolean?) {
|
||||
while (true) {
|
||||
var y = select(x) ?: if (b == true) continue!! else if (!(b != false)) return else break ?: break::class
|
||||
select(z) !== y && if (b == true) return else if (b === false) null!!else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: Any?) {
|
||||
if (x is Number?) {
|
||||
var y = select(select(select(select(select(select(x))))))
|
||||
if (y == null) throw Exception()
|
||||
var z = select(select(select(select(y), select(y)), select(select(y), select(y))), select(select(select(y), select(y)), select(select(y), select(y))))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Number?")!>y<!>.toByte()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>z<!>.toByte()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(x: Any?) {
|
||||
if (x is Number?) {
|
||||
var y = removeNullable(x)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>y<!>.toByte()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: Any?) {
|
||||
if (x is Number?) {
|
||||
var y = removeNullable(removeNullable(removeNullable(removeNullable(x), removeNullable(x)), removeNullable(removeNullable(x), removeNullable(x))), removeNullable(removeNullable(removeNullable(x), removeNullable(x)), removeNullable(removeNullable(x), removeNullable(x))))
|
||||
if (y !is Int) throw Exception()
|
||||
var z = select(select(select(select(y), select(y)), select(select(y), select(y))), select(select(select(y), select(y)), select(select(y), select(y))))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Number")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Number")!>y<!>.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>.inv()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 37
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
while (true) {
|
||||
x ?: return
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(a: Any?) {
|
||||
while (true) {
|
||||
a ?: return
|
||||
a
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756, KT-35668
|
||||
*/
|
||||
fun case_3(x: Int?) {
|
||||
while (true) {
|
||||
x ?: return ?: <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Boolean?) {
|
||||
while (true && (x == true || x == null)) {
|
||||
x ?: return
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_5(x: Boolean?) {
|
||||
while (true) {
|
||||
x ?: x ?: null!!
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Boolean?) {
|
||||
while (true) {
|
||||
if (x != true) throw Exception()
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Boolean?) {
|
||||
while (true) {
|
||||
if (!(x === false)) return
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Boolean?) {
|
||||
while (x ?: return)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Boolean?) {
|
||||
while (x ?: return)
|
||||
while (x == null)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Boolean?) {
|
||||
while (true) {
|
||||
x ?: return
|
||||
while (x) {}
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Boolean?) {
|
||||
while (true) {
|
||||
x ?: return
|
||||
break
|
||||
x
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: Boolean?) {
|
||||
while (true) {
|
||||
x ?: return
|
||||
break && x
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_13(x: Boolean?) {
|
||||
while (true) {
|
||||
x ?: x!!
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_14(x: Boolean?) {
|
||||
do {
|
||||
x ?: return
|
||||
} while(false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: Boolean?) {
|
||||
do {
|
||||
x ?: return
|
||||
println(1)
|
||||
} while(false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 16
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30756
|
||||
*/
|
||||
fun case_16(x: Boolean?) {
|
||||
do {
|
||||
x ?: x!!
|
||||
} while(false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(x: Boolean?, y: Boolean?) {
|
||||
loop@ while (true) {
|
||||
when (y) {
|
||||
true -> x!!
|
||||
false -> x!!
|
||||
null -> if (true) if (true) if (true) if (true) if (true) when (y) {
|
||||
true -> when (y) {
|
||||
else -> if (true) if (true) if (true) if (true) if (true) x!! else x!! else x!! else x!! else x!! else x!!
|
||||
}
|
||||
false -> x!!
|
||||
null -> if (true) if (true) if (true) if (true) if (true) x!! else x!! else x!! else x!! else x!! else x!!
|
||||
} else x!! else x!! else x!! else x!! else x!!
|
||||
}
|
||||
break@loop
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.not()
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Byte? & kotlin.Comparable<*>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Byte? & kotlin.Comparable<*>?")!>x<!>?.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Byte")!>x!!<!>.dec()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: ClassWithThreeTypeParameters<*, *, *>?) {
|
||||
if (x is InterfaceWithTwoTypeParameters<*, *>?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *>? & ClassWithThreeTypeParameters<*, *, *>? & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *>? & ClassWithThreeTypeParameters<*, *, *>? & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>?.x
|
||||
x?.y
|
||||
x?.z
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *>")!>x!!<!>.ip2test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: ClassWithThreeTypeParameters<*, *, *>) {
|
||||
if (x is InterfaceWithTwoTypeParameters<*, *>?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>")!>x<!>.x
|
||||
x.y
|
||||
x.z
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *>")!>x!!<!>.ip2test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>")!>x<!>.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: ClassWithSixTypeParameters<*, *, *, *, *, *>?) {
|
||||
if (x is InterfaceWithTwoTypeParameters<*, *>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>x<!>.x
|
||||
x.y
|
||||
x.z
|
||||
x.u
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>x!!<!>.ip2test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>x<!>.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: ClassWithThreeTypeParameters<*, *, *>?) {
|
||||
if (x is InterfaceWithTwoTypeParameters<*, *>?) {
|
||||
if (x === null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>.x
|
||||
x.y
|
||||
x.z
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>.ip2test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<*, *> & ClassWithThreeTypeParameters<*, *, *> & ClassWithThreeTypeParameters<*, *, *>?")!>x<!>.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_5(x: Any?) {
|
||||
if (x is ClassWithThreeTypeParameters<*, *, *>?) {
|
||||
if (x is InterfaceWithTwoTypeParameters<*, *>?) {
|
||||
if (x === null) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<*, *, *> & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<*, *, *> & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any?")!>x<!>.x
|
||||
x.y
|
||||
x.z
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<*, *, *> & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any?")!>x<!>.ip2test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<*, *, *> & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<*, *, *> & InterfaceWithTwoTypeParameters<*, *> & kotlin.Any?")!>x<!>.x
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 39
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_1(x: Number?) {
|
||||
val y: Int? = null
|
||||
|
||||
if (x == y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Number) {
|
||||
val y: Int? = null
|
||||
|
||||
if (x === y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Number) {
|
||||
var y: Int? = null
|
||||
|
||||
if (x === y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_4() {
|
||||
var x: Number? = null
|
||||
var y: Int? = null
|
||||
|
||||
if (x == y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>x<!>?.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_5(x: Class, y: Class) {
|
||||
if (x.prop_14 == y.prop_15) {
|
||||
x.prop_14
|
||||
x.prop_14.inv()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: objects, enumClasses, classes, properties, typealiases
|
||||
*/
|
||||
|
||||
// FILE: other_package.kt
|
||||
|
||||
package otherpackage
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
class EmptyClass13 {}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
typealias TypealiasString14 = String
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
import otherpackage.*
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any) {
|
||||
if (x === null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Nothing) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
if (Object.prop_2 != null)
|
||||
else {
|
||||
Object.prop_2
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Char) {
|
||||
if (x == null && true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x: Unit = kotlin.Unit
|
||||
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: EmptyClass) {
|
||||
val y = true
|
||||
|
||||
if (x == null && !y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
if (anonymousTypeProperty == null || <!DEBUG_INFO_EXPRESSION_TYPE("anonymous & anonymous")!>anonymousTypeProperty<!> == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("anonymous")!>anonymousTypeProperty<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasString) {
|
||||
if (x == null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!> == null) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: TypealiasString) {
|
||||
if (x != null) {
|
||||
|
||||
} else if (false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10() {
|
||||
val a = Class()
|
||||
|
||||
if (a.prop_5 != null || true) {
|
||||
if (a.prop_5 == null) {
|
||||
a.prop_5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: TypealiasString, y: TypealiasString) {
|
||||
val z: TypealiasString = TypealiasString()
|
||||
|
||||
if (x != null) {
|
||||
|
||||
} else {
|
||||
if (y == null) {
|
||||
if (stringProperty != null) {
|
||||
if (false || false || false || z == null || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: TypealiasString, y: TypealiasString) = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>if (x != null) "1"
|
||||
else if (y !== null) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
else "-1"<!>
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: otherpackage.EmptyClass13) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>if (x != null) {
|
||||
1
|
||||
} else <!DEBUG_INFO_EXPRESSION_TYPE("otherpackage.EmptyClass13")!>x<!><!>
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
class A14 {
|
||||
val x: otherpackage.TypealiasString14
|
||||
init {
|
||||
x = otherpackage.TypealiasString14()
|
||||
}
|
||||
}
|
||||
|
||||
fun case_14() {
|
||||
val a = A14()
|
||||
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x === null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x === null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x == null) {
|
||||
if (a.x === null) {
|
||||
a.x
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: TypealiasString) {
|
||||
val t = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>if (true && x != null) "" else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16() {
|
||||
val x: TypealiasNothing = return
|
||||
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 17
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (true && true && intProperty != null) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>intProperty<!>
|
||||
}<!>
|
||||
|
||||
//TESTCASE NUMBER: 18
|
||||
fun case_18(a: DeepObject.A.B.C.D.E.F.G.J) {
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(b: Boolean) {
|
||||
val a = if (b) {
|
||||
object {
|
||||
val B19 = if (b) {
|
||||
object {
|
||||
val C19 = if (b) {
|
||||
object {
|
||||
val D19 = if (b) {
|
||||
object {
|
||||
val x: Number = 10
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
|
||||
if (a != null && a.B19 != null && a.B19.C19 != null && a.B19.C19.D19 != null && a.B19.C19.D19.x == null) {
|
||||
a.B19.C19.D19.x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20() {
|
||||
val a = object {
|
||||
val B19 = object {
|
||||
val C19 = object {
|
||||
val D19 = object {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a.B19.C19.D19 === null) {
|
||||
a.B19.C19.D19
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21() {
|
||||
if (EnumClassWithProperty.B.prop_1 == null || false || false || false || false || false || false || false) {
|
||||
EnumClassWithProperty.B.prop_1
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(a: (() -> Unit)) {
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit")!>a()<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(a: ((Float) -> Int), b: Float) {
|
||||
if (a == null && b == null) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float")!>b<!>)<!>
|
||||
if (x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 24
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_24(a: ((() -> Unit) -> Unit), b: (() -> Unit)) {
|
||||
if (false || false || a == null && b === null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>")!>b<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(a: (() -> Unit) -> Unit, b: (() -> Unit) -> Unit = if (a == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>")!>a<!> else {{}}) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>")!>b<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: Int, b: Int = if (a === null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 40
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-28242
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x!!<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-28242
|
||||
*/
|
||||
fun case_2(x: Any?) {
|
||||
if (x is Int?) {
|
||||
(x as Int).inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x!!<!>.run {
|
||||
inv()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>select(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x!!<!>)<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
x!!
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>select(x)<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
fun case_6(x: Any?) {
|
||||
if (x is Boolean? && x!!) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Any?")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>select(x)<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Boolean?) {
|
||||
if (x != null && x!!) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>select(x)<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x != null && x is Boolean?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Any?")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>select(x)<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (x is Boolean? && x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Any?")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>select(x)<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
if (x as Boolean) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Any?")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>select(x)<!>.not()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_11(x: Any?) {
|
||||
if ((x as Boolean?)!!) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>select(x)<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_12(x: Any?) {
|
||||
if (x!! as Boolean?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>not<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>select(x)<!>.<!UNRESOLVED_REFERENCE!>not<!>()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30376
|
||||
*/
|
||||
fun case_13(x: Any?) {
|
||||
if (x as Boolean? ?: x!!) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>select(x)<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28430
|
||||
*/
|
||||
fun case_14(x: Any?) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 15
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28430
|
||||
*/
|
||||
fun case_15(x: Any?) {
|
||||
if (x !== null) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>?.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>x!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 16
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28430
|
||||
*/
|
||||
fun case_16(x: Nothing?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>?.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x!!<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 41
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_1(x: Any) {
|
||||
if (x is Interface1) {
|
||||
if (x is Interface2) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>.itest2()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_2(x: Any) {
|
||||
if (x is Interface2) {
|
||||
if (x is Interface1) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any")!>x<!>.itest0()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_3(x: Any) {
|
||||
if (x is Interface1) {
|
||||
if (x is Interface2) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any")!>x<!>.itest000()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_4(x: Any) {
|
||||
if (x is Interface2) {
|
||||
if (x is Interface1) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any")!>x<!>.itest0000()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 42
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-19446
|
||||
*/
|
||||
fun case_1() {
|
||||
var x: Boolean? = true
|
||||
x!!
|
||||
val y = {
|
||||
val x: Int?
|
||||
x = 10
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-19446
|
||||
*/
|
||||
fun case_2() {
|
||||
var x: Boolean? = true
|
||||
x!!
|
||||
val y = {
|
||||
var x: Int? = 10
|
||||
x = 10
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
var x: Boolean? = true
|
||||
x!!
|
||||
val y = {
|
||||
var x: Int? = 10
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean & kotlin.Boolean?")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 43
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_1(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
val c = select(a, b)
|
||||
if (c != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest2()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_2(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
select(a, b)!!.run {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>this<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>this<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>this<!>.itest2()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_3(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
val c = select(a, b)!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest2()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_4(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
val c = select(a, b) ?: return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest2()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_5(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
val foo = l1@ fun(): Any {
|
||||
val bar = l2@ fun() {
|
||||
val c = select(a, b) ?: return@l2
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>c<!>.itest2()
|
||||
}
|
||||
return bar
|
||||
}
|
||||
println(foo)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_6(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
val c = select(a, b)
|
||||
c ?: return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest2()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* ISSUES: KT-28670
|
||||
*/
|
||||
fun case_7(a: Interface1?, b: Interface2?) {
|
||||
b as Interface1?
|
||||
a as Interface2?
|
||||
|
||||
val foo = l1@ fun(): Any {
|
||||
val bar = l2@ fun() {
|
||||
val c = select(a, b)
|
||||
c ?: return@l2
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>c<!>.itest2()
|
||||
}
|
||||
return bar
|
||||
}
|
||||
println(foo)
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 44
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28760
|
||||
*/
|
||||
fun Int?.case_1() {
|
||||
val x = this
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28760
|
||||
*/
|
||||
fun Int?.case_2() {
|
||||
val x = this
|
||||
if (this != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28760
|
||||
*/
|
||||
fun Int?.case_3() {
|
||||
val x = this
|
||||
this!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28760
|
||||
*/
|
||||
fun Int?.case_4() {
|
||||
val x = this
|
||||
x!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 45
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28759
|
||||
*/
|
||||
fun case_1() {
|
||||
val x: Int? = 10
|
||||
val y: Int?
|
||||
y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28759
|
||||
*/
|
||||
fun case_2() {
|
||||
val x: Int? = 10
|
||||
val y: Int?
|
||||
y = x
|
||||
y!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28759
|
||||
*/
|
||||
fun case_3() {
|
||||
var x: Int? = 10
|
||||
val y: Int?
|
||||
y = x
|
||||
y!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28759
|
||||
*/
|
||||
fun case_4() {
|
||||
val x: Int? = 10
|
||||
var y: Int?
|
||||
y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x: Int?
|
||||
val y: Int?
|
||||
x = 10;y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6() {
|
||||
var x: Int?
|
||||
val y: Int?
|
||||
x = 10;y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
val x: Int?
|
||||
var y: Int?
|
||||
x = 10;y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8() {
|
||||
var x: Int?
|
||||
var y: Int?
|
||||
x = 10;y = x
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
// WITH_REFLECT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 46
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
import kotlin.reflect.*
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29936
|
||||
*/
|
||||
fun case_1(x: Int?) {
|
||||
if (x != funNothingQuest() == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29936
|
||||
*/
|
||||
fun case_2(x: Int?) {
|
||||
operator fun Nothing?.not() = null
|
||||
if (x != !null != false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29936
|
||||
*/
|
||||
fun case_3(x: Int?) {
|
||||
if (x == funWithoutArgs() == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29936
|
||||
*/
|
||||
fun case_4(x: Int?, y: List<Nothing?>) {
|
||||
if (x == y[0] == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_5(x: Int?) {
|
||||
val y = object {
|
||||
val z = null
|
||||
}
|
||||
|
||||
if (x == y.z == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_6(x: Int?) {
|
||||
val y = null
|
||||
|
||||
if (x == y == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_7(x: Int?) {
|
||||
val y = object {
|
||||
val z: Nothing?
|
||||
get() = null
|
||||
}
|
||||
|
||||
if (x == y.z == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28265
|
||||
*/
|
||||
fun case_8(x: KClass<EmptyObject>?) {
|
||||
if (x == EmptyObject::class == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KClass<EmptyObject> & kotlin.reflect.KClass<EmptyObject>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KClass<EmptyObject> & kotlin.reflect.KClass<EmptyObject>?")!>x<!>.java
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 47
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) return
|
||||
if (true) break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
*/
|
||||
fun case_2(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) continue
|
||||
if (true) break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) return continue
|
||||
if (true) break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) throw Exception()
|
||||
break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) return throw Exception()
|
||||
if (true) break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(a: Any?) {
|
||||
while (true) {
|
||||
if (a == null) return throw Exception()
|
||||
break
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>a<!>.equals(10)
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 48
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_1(x: Any?, y: Any?) {
|
||||
if (x!! === y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_2(x: Any?, y: Any?) {
|
||||
if (x as Int === y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>inv<!>(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>inv<!>(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_3(x: Any?, y: Any?) {
|
||||
if (y === x!!) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_4(x: Any?, y: Any?) {
|
||||
if (y === x as Int) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>inv<!>(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>inv<!>(10)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 49
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: annotations, classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29935
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Int == @RetentionSourceAndTargetExpression true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29935
|
||||
*/
|
||||
fun case_2(x: Int?) {
|
||||
if (x != @RetentionSourceAndTargetExpression null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29935
|
||||
*/
|
||||
fun case_3(x: Int?, y: Int) {
|
||||
if (x == y == @RetentionSourceAndTargetExpression true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29935
|
||||
*/
|
||||
fun case_4(x: Int?, y: Int) {
|
||||
if (@RetentionSourceAndTargetExpression !!(x == y)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,391 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 5
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, interfaces, properties, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x is Number?) {
|
||||
if (x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any?) {
|
||||
if (x is Number? && x is Int? && x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x is Number?) {
|
||||
if (x !== null) {
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
if (x != null) {
|
||||
if (x is Number) {
|
||||
if (x is Int?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (x is ClassLevel1?) {
|
||||
if (x is ClassLevel2?) {
|
||||
if (x is ClassLevel3?) {
|
||||
if (x is ClassLevel4?) {
|
||||
if (x is ClassLevel5?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
if (x is ClassLevel1?) {
|
||||
if (x is ClassLevel2?) {
|
||||
if (x is ClassLevel3?) {
|
||||
if (x != null && x is ClassLevel4?) {
|
||||
if (x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
|
||||
if (x is ClassLevel4? && x != null && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
|
||||
if (x is ClassLevel4? && x != null && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3? && x is ClassLevel4? && x != null && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
|
||||
if (x is ClassLevel4?) {
|
||||
|
||||
} else if (x is ClassLevel5? && x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
} else if (x is ClassLevel4? && x != null && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?")!>x<!>.test5()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* NOTE: lazy smartcasts
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_11(x: Any?) {
|
||||
if (x is Interface1?) {
|
||||
if (x is Interface2?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any?")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any?")!>x<!>.itest2()
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2 & kotlin.Any?")!>x<!>.let { <!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2")!>it<!>.itest1(); <!DEBUG_INFO_EXPRESSION_TYPE("Interface1 & Interface2")!>it<!>.itest2() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* NOTE: lazy smartcasts
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_12(x: Any?) {
|
||||
if (x is Interface1? && x != null && x is Interface2?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any?")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any?")!>x<!>.itest2()
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & kotlin.Any?")!>x<!>.let { <!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>it<!>.itest1(); <!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1")!>it<!>.itest2() }
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* NOTE: lazy smartcasts
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_13(x: Any?) {
|
||||
if (x is Interface2?) {
|
||||
if (x is ClassLevel1?) {
|
||||
if (x is ClassLevel2? && x is Interface1?) {
|
||||
if (x !is Interface3?) {} else if (false) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.test2()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* NOTE: lazy smartcasts
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_14(x: Any?) {
|
||||
if (x is Interface2?) {
|
||||
if (x is ClassLevel1?) {
|
||||
if (x == null || x !is Interface1?) else {
|
||||
if (x is ClassLevel2?) {
|
||||
if (x is Interface3?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.itest3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & ClassLevel2 & Interface3 & kotlin.Any?")!>x<!>.test2()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 15
|
||||
* NOTE: lazy smartcasts
|
||||
* DISCUSSION
|
||||
* ISSUES: KT-28362
|
||||
*/
|
||||
fun case_15(x: Any?) {
|
||||
if (x !is ClassLevel2? || x !is ClassLevel1?) else {
|
||||
if (x === null || x !is Interface1?) else {
|
||||
if (x !is Interface2? || x !is Interface3?) {} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>.itest2()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>.itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>.itest3()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>.test1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel2 & Interface1 & Interface3 & Interface2 & kotlin.Any?")!>x<!>.test2()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(a: Any?, b: Int = if (a is Number? && a is Int? && a !== null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(a: Any?, b: Int = if (a !is Number? || a !is Int? || a == null) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.funNullableAny()
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 50
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun Any.case_1() {
|
||||
if (this is Inv<*>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.prop_4
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.prop_4.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun Any.case_2() {
|
||||
if (this is ClassWithSixTypeParameters<*, *, *, *, *, *>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.y
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun <T> T.case_3() {
|
||||
if (this is Inv<*>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.prop_4
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.prop_4.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun <T> T?.case_4() {
|
||||
if (this is ClassWithSixTypeParameters<*, *, *, *, *, *>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.y
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun <T> ClassWithSixTypeParameters<out T, *, T, in T?, *, T>.case_5() {
|
||||
if (this is InterfaceWithFiveTypeParameters1<*, *, *, *, *>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.itest1()
|
||||
itest1()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.test()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.y
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-25432
|
||||
*/
|
||||
fun <T> case_6(y: Inv<out T>) {
|
||||
if (y.prop_3 is MutableList<*>) {
|
||||
y.prop_3
|
||||
y.prop_3[0]
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* ISSUES: KT-25432
|
||||
*/
|
||||
fun <T> Inv<out T>.case_7() {
|
||||
if (this.prop_3 is MutableList<*>) {
|
||||
this.prop_3
|
||||
this.prop_3[0]
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & T!! & T")!>prop_3<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & T!! & T")!>prop_3<!>[0]
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun <T> T.case_8() {
|
||||
this as MutableList<T>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Any?, kotlin.Boolean>")!>this::equals<!>
|
||||
this.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<kotlin.Any?, kotlin.Boolean>")!>::equals<!>
|
||||
equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* ISSUES: KT-8966
|
||||
*/
|
||||
fun <T> T.case_9() {
|
||||
if (this is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & kotlin.String & T!!")!>this<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & kotlin.String & T!!")!>this<!>.length
|
||||
length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 51
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
val y = run {
|
||||
if (x is Class)
|
||||
return@run <!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
Class()
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Class?) {
|
||||
val y = run {
|
||||
x!!
|
||||
return@run <!DEBUG_INFO_EXPRESSION_TYPE("Class & Class?")!>x<!>
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(z: Any?) {
|
||||
val y = run {
|
||||
when (z) {
|
||||
is Class? -> z!!
|
||||
is Class -> return@run z
|
||||
is Float -> Class()
|
||||
else -> return@run Class()
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(z: Any?) {
|
||||
val y = run {
|
||||
when (z) {
|
||||
is Class? -> z!!
|
||||
is Class -> return@run z
|
||||
is Float -> Class()
|
||||
else -> return@run Class()
|
||||
}
|
||||
Class()
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(z: Any?) {
|
||||
val y = run {
|
||||
when (z) {
|
||||
is Class? -> z!!
|
||||
is Class -> return@run z
|
||||
is Float -> Class()
|
||||
else -> return@run Class()
|
||||
}
|
||||
""
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(z: Any?) {
|
||||
val y = z.let {
|
||||
when (it) {
|
||||
is Class? -> it!!
|
||||
is Class -> return@let it
|
||||
is Float -> Class()
|
||||
else -> return@let Class()
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(z: Any?) {
|
||||
val y = z.let {
|
||||
it as Class
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(z: Any?) {
|
||||
val y = z.let {
|
||||
return@let it as Class
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(z: Any?) {
|
||||
val y = z.run {
|
||||
this as Class
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(z: Any?) {
|
||||
val y = z.run {
|
||||
return@run this as Class
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(z: Any?, x: Any?) {
|
||||
val y = z.let {
|
||||
if (it is ClassLevel6)
|
||||
return@let it
|
||||
x as ClassLevel3
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel3")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel3")!>y<!>.test3()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(z: Any?) {
|
||||
val y = z.let {
|
||||
return@let it as Int
|
||||
it as? Float ?: 10f
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>")!>y<!>.toByte()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* ISSUES: KT-30927
|
||||
*/
|
||||
fun case_13(z: Any?) {
|
||||
val y = z.run {
|
||||
if (this is ClassLevel6)
|
||||
return@run this
|
||||
this as ClassLevel3
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel3")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel3")!>y<!>.test3()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(z: Any?) {
|
||||
val y = z.run {
|
||||
return@run this as Int
|
||||
this as? Float ?: 10f
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<kotlin.Int & kotlin.Float>")!>y<!>.toByte()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 15
|
||||
* NOTE: 'Any' is common super type between kotlin.Unit (obtained using coersion to Unit) and Int
|
||||
*/
|
||||
fun case_15(z: Any?) {
|
||||
val y = z.let {
|
||||
return@let it as Int
|
||||
while (true) { println(1) }
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 16
|
||||
* NOTE: 'Any' is common super type between kotlin.Unit (obtained using coersion to Unit) and Int
|
||||
*/
|
||||
fun case_16(z: Any?) {
|
||||
val y = z.run {
|
||||
return@run this as Int
|
||||
while (true) { println(1) }
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 17
|
||||
* ISSUES: KT-30927
|
||||
*/
|
||||
fun case_17(z: Any?) {
|
||||
val y = z.run {
|
||||
when (this) {
|
||||
is Class? -> this!!
|
||||
is Class -> return@run this
|
||||
is Float -> Class()
|
||||
else -> return@run Class()
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class")!>y<!>.fun_1()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 18
|
||||
* ISSUES: KT-30927
|
||||
*/
|
||||
fun case_18(z: Any?) {
|
||||
val y = z.run {
|
||||
this as Int
|
||||
this
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(z: Any?) {
|
||||
val y = z.let {
|
||||
it as Int
|
||||
it
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>y<!>.inv()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 20
|
||||
* ISSUES: KT-30927
|
||||
*/
|
||||
fun case_20(z: Any?) {
|
||||
val y = z.run {
|
||||
this!!
|
||||
this
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21(z: Any?) {
|
||||
val y = z.run {
|
||||
if (true) this as Any else this!!
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(z: Any?) {
|
||||
val y = z.let {
|
||||
if (true) it as Any else it!!
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(z: Any?) {
|
||||
val y = z.run {
|
||||
when (this) {
|
||||
true -> this!!
|
||||
0.0 -> this as Any
|
||||
else -> this!!
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun case_24(z: Any?) {
|
||||
val y = z.let {
|
||||
when (it) {
|
||||
true -> it!!
|
||||
0.0 -> it as Any
|
||||
else -> it!!
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(z: Any?) {
|
||||
val y = z.run {
|
||||
when (this) {
|
||||
true -> this
|
||||
if (true) this as Int else this as Float -> this
|
||||
return@run this as Float -> this
|
||||
else -> this!!
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(z: Any?) {
|
||||
val y = z.let {
|
||||
when (it) {
|
||||
true -> it
|
||||
if (true) it as Int else it as Float -> it
|
||||
return@let it as Int -> it
|
||||
else -> it!!
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 27
|
||||
fun case_27(z: Any?) {
|
||||
val y = z.let {
|
||||
if (it == null) return@let Any()
|
||||
it
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 28
|
||||
* ISSUES: KT-30927
|
||||
*/
|
||||
fun case_28(z: Any?) {
|
||||
val y = z.run {
|
||||
if (this == null) throw IllegalStateException()
|
||||
this
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 29
|
||||
fun case_29(z: Any?) {
|
||||
val y = z.let {
|
||||
if (it == null) throw IllegalStateException()
|
||||
it
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 52
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-22175
|
||||
*/
|
||||
fun case_1(x: String?) = x
|
||||
fun case_1(x: Int?) = x
|
||||
fun case_1() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
case_1(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Int?) = x
|
||||
fun case_2(x: Nothing?) = x
|
||||
fun case_2() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
case_2(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: String?) = x
|
||||
fun case_3() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!INAPPLICABLE_CANDIDATE!>case_3<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-22175
|
||||
*/
|
||||
fun String?.case_4() = this
|
||||
fun Int?.case_4() = this
|
||||
fun case_4() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_4()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun Int?.case_5() = this
|
||||
fun Nothing?.case_5() = this
|
||||
fun case_5() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_5()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun String?.case_6() = this
|
||||
fun case_6() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>case_6<!>()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-22175
|
||||
*/
|
||||
fun <T : String?> T.case_7() = this
|
||||
fun <T : Int?> T.case_7() = this
|
||||
fun case_7() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_7()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun <T : Int?> T.case_8() = this
|
||||
fun <T : Nothing?> T.case_8() = this
|
||||
fun case_8() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_8()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun <T : String?> T.case_9() = this
|
||||
fun case_9() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>case_9<!>()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-22175
|
||||
*/
|
||||
fun <T : String> T?.case_10() = this
|
||||
fun <T : Int> T?.case_10() = this
|
||||
fun case_10() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_10()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun <T : String> T?.case_11() = this
|
||||
fun case_11() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>case_11<!>()
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 53
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Int) = ""
|
||||
fun case_1(x: Int?) = 10
|
||||
fun case_1() {
|
||||
var x: Int? = 10
|
||||
if (x != null) {
|
||||
val z = case_1(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Int) = ""
|
||||
fun case_2(x: Int?) = 10
|
||||
fun case_2() {
|
||||
var x: Int? = 10
|
||||
var y = { x = null }
|
||||
if (x != null) {
|
||||
val z = case_2(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
val case_3_prop: Int?
|
||||
get() = 10
|
||||
|
||||
fun case_3(x: Int) = ""
|
||||
fun case_3(x: Int?) = 10
|
||||
fun case_3() {
|
||||
if (case_3_prop != null) {
|
||||
val z = case_3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>case_3_prop<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4 {
|
||||
var x: Int? = 10
|
||||
}
|
||||
|
||||
fun case_4(x: Int) = ""
|
||||
fun case_4(x: Int?) = 10
|
||||
fun case_4(y: Case4) {
|
||||
if (y.x != null) {
|
||||
val z = case_4(y.x)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
open class Case5 {
|
||||
open val x: Int? = 10
|
||||
}
|
||||
|
||||
fun case_5(x: Int) = ""
|
||||
fun case_5(x: Int?) = 10
|
||||
fun case_5(y: Case4) {
|
||||
if (y.x != null) {
|
||||
val z = case_5(y.x)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
class Case6 {
|
||||
val x: Int? by lazy { 10 }
|
||||
}
|
||||
|
||||
fun case_6(x: Int) = ""
|
||||
fun case_6(x: Int?) = 10
|
||||
fun case_6(y: Case4) {
|
||||
if (y.x != null) {
|
||||
val z = case_6(y.x)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
var case_7_prop: Int?
|
||||
get() = 10
|
||||
set(value) {}
|
||||
|
||||
fun case_7(x: Int) = ""
|
||||
fun case_7(x: Int?) = 10
|
||||
fun case_7() {
|
||||
if (case_7_prop != null) {
|
||||
val z = case_7(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>case_7_prop<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>z<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 54
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_1() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
while (a is String) {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_2() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
while (true) {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_3() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
do {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
} while (true)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_4() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
do {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
} while (false)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_5() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
for (i in 0..10) {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
if (a is String) {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
when (true) {
|
||||
true -> b = a
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_8() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
try {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
} catch (e: Exception) { }
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
try {
|
||||
|
||||
} catch (e: Exception) {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
try {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
try {
|
||||
|
||||
} finally {
|
||||
b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_12() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
while (if (true) { b = a; true } else true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
a.plus(if (true) { b = a; true } else true)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7676
|
||||
*/
|
||||
fun case_14() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
while (true) {
|
||||
if (true) { b = a; } else 3
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15() {
|
||||
var a: Any = 4
|
||||
if (a is String) {
|
||||
var b = a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
while (true) {
|
||||
if (true) { b = a; } else { b = a; }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String")!>b<!>.length
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 55
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-10662
|
||||
*/
|
||||
fun case_1(x: Any) {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>x!!<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-10662
|
||||
*/
|
||||
fun case_2(x: Any?) {
|
||||
if (x is String?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>x!!<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-10662
|
||||
*/
|
||||
fun case_3(x: Any) {
|
||||
if (x is Map.Entry<*, *>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map.Entry<*, *>")!>x!!<!>.key
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map.Entry<*, *> & kotlin.Any")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-10662
|
||||
*/
|
||||
fun case_4(x: Any?) {
|
||||
if (x is Map.Entry<*, *>?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map.Entry<*, *>")!>x!!<!>.value
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.Map.Entry<*, *> & kotlin.Any?")!>x<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 56
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Class?) {
|
||||
if (x != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.Function1<kotlin.Int, kotlin.Function1<kotlin.Int, kotlin.Int>>>")!>x::fun_1<!>
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17386
|
||||
*/
|
||||
fun case_2(x: Class?) {
|
||||
val y = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.Function1<kotlin.Int, kotlin.Function1<kotlin.Int, kotlin.Int>>>?")!>if (x != null) x::fun_1 else null<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction0<kotlin.Function1<kotlin.Int, kotlin.Function1<kotlin.Int, kotlin.Int>>>?")!>y<!>
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17386
|
||||
*/
|
||||
fun case_3(x: Class?) {
|
||||
val y = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<Class, kotlin.Function1<kotlin.Int, kotlin.Function1<kotlin.Int, kotlin.Int>>>?")!>if (x != null) Class::fun_1 else null<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.reflect.KFunction1<Class, kotlin.Function1<kotlin.Int, kotlin.Function1<kotlin.Int, kotlin.Int>>>?")!>y<!>
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-17386
|
||||
*/
|
||||
fun case_4(x: Class?) {
|
||||
val y = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>if (x != null) x::fun_1 else 10<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* ISSUES: KT-17386
|
||||
*/
|
||||
fun case_5(x: Class?) {
|
||||
val y = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>if (x != null) Class::fun_1 else 10<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 57
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-20656
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val y = if (true) Class::fun_1 else Class::fun_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val z: String = x
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-20656, KT-17386
|
||||
*/
|
||||
fun case_2(x: Any?, b: Boolean?) {
|
||||
x!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
val y = when (b) {
|
||||
true -> Class::fun_1
|
||||
false -> Class::fun_2
|
||||
null -> Class::fun_3
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
val z: Any = x
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-20656
|
||||
*/
|
||||
fun case_3(x: Any?, b: Boolean?) {
|
||||
x as Int
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val y = when (b) {
|
||||
else -> Class::fun_1
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val z: Int = x
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?, b: Boolean?) {
|
||||
x as Int
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
if (b!!) {
|
||||
val m = Class::fun_1
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val z: Int = x
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* ISSUES: KT-20656
|
||||
*/
|
||||
fun case_5(x: Any?, b: Class) {
|
||||
x as Int
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val y = if (true) b::fun_1 else b::fun_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val z: Int = x
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* ISSUES: KT-20656
|
||||
*/
|
||||
fun case_6(x: Any?, b: Class) {
|
||||
x as Int
|
||||
val z1 = x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
val y = if (true) b::fun_1 else b::fun_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>z1<!>
|
||||
val z2: Int = z1
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* ISSUES: KT-20656
|
||||
*/
|
||||
fun case_7_1() {}
|
||||
fun case_7(x: Any?) {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val y = if (true) ::case_7_1 else ::case_7_1
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val z: String = x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8_1() {}
|
||||
fun case_8(x: Any?) {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val m = try {
|
||||
::case_8_1
|
||||
} catch (e: Exception) {
|
||||
::case_8_1
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val z: String = x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (x is String) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val m = try {
|
||||
Class::fun_1
|
||||
} finally {
|
||||
Class::fun_1
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
val z: String = x
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 58
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-18532
|
||||
*/
|
||||
fun case_1() {
|
||||
val x = In<Int>()
|
||||
val y: In<*>
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: In<*> = x
|
||||
z.put(0)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-18532
|
||||
*/
|
||||
fun case_2() {
|
||||
val x = Inv<Int>()
|
||||
val y: Inv<out Number>
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: Inv<out Number> = x
|
||||
z.put(0)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
val x = Inv<Number>()
|
||||
val y: Inv<Number>
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: Inv<Number> = x
|
||||
z.put(0)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
val x = In<Number>()
|
||||
val y: In<Number>
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: In<Number> = x
|
||||
z.put(0)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-18532
|
||||
*/
|
||||
fun case_5() {
|
||||
val x = Inv<Int>()
|
||||
var y: Inv<out Number> = Inv<Int>()
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: Inv<out Number> = x
|
||||
z.put(0)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-18532
|
||||
*/
|
||||
fun case_6() {
|
||||
val x = Inv<Int>()
|
||||
var y: Inv<out Number> = Inv<Int>()
|
||||
if (true)
|
||||
y = x
|
||||
y.put(0)
|
||||
val z: Inv<out Number> = x
|
||||
z.put(0)
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE -UNUSED_VALUE
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 59
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_1() {
|
||||
var x: Any? = null
|
||||
if (x == null) return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_2() {
|
||||
var x: Any? = null
|
||||
if (x === null) return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x !== null)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
var x: Any? = null
|
||||
while (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4() {
|
||||
var x: Any? = null
|
||||
while (x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_5() {
|
||||
var x: Any? = null
|
||||
if (x == null) return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x !== null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_6() {
|
||||
var x: Any? = null
|
||||
if (x === null) return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_7() {
|
||||
var x: Any? = null
|
||||
x ?: return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x !== null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_8() {
|
||||
var x: Any? = null
|
||||
if (x == null) throw Exception()
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_9() {
|
||||
var x: Any? = null
|
||||
x ?: throw Exception()
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x !== null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_10() {
|
||||
var x: Any? = null
|
||||
x as Any
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_11() {
|
||||
var x: Any? = null
|
||||
x as? Any ?: null!!
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
} while (x != null)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_12() {
|
||||
var x: Any? = null
|
||||
if (x is Any) {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x .equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_13() {
|
||||
var x: Any? = null
|
||||
if (x != null) {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x .equals(10)
|
||||
} while (x != null)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_14() {
|
||||
var x: Any? = null
|
||||
if (x == null) return
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x.equals(10)
|
||||
} while (x is Any)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 15
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-7508
|
||||
*/
|
||||
fun case_15() {
|
||||
var x: Any? = null
|
||||
if (x is Any) {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
x = x .equals(10)
|
||||
} while (x is Any)
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 60
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
var x: String? = null
|
||||
|
||||
outer@ while (x != null) {
|
||||
inner@ do {
|
||||
x = null
|
||||
} while (x == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 61
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
class Case1 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
constructor()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class Case3 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
init { }
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
class Case4 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
constructor(y: Int?) {
|
||||
println(y)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
class Case5() {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
constructor(y: Int?) : this() {
|
||||
println(y)
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
class Case6() {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
class Case7() {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
}
|
||||
constructor(y: Int?) : this() {
|
||||
println(y)
|
||||
}
|
||||
constructor(y: Int?, z: Int?) : this() {
|
||||
println(y)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
class Case8 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
y!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
constructor()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 9
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
class Case9 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y == null) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
constructor()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
class Case10 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
y ?: throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.length
|
||||
}
|
||||
constructor()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
val case_12: Nothing? get() = null
|
||||
class Case11 {
|
||||
init {
|
||||
var y: String? = "xyz"
|
||||
if (y == case_12)
|
||||
throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
}
|
||||
constructor()
|
||||
}
|
||||
@@ -0,0 +1,463 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 62
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_1(x: Any) {
|
||||
x as Boolean
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_2(x: Any) {
|
||||
x as Boolean?
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
null -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_3(x: Any?) {
|
||||
x as Boolean?
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
null -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?): String {
|
||||
x as Boolean
|
||||
return when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_5(x: Any): String {
|
||||
x as Boolean?
|
||||
return when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_6(x: Any) {
|
||||
if (x is Boolean) {
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 7
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_7(x: Any) {
|
||||
if (x is Boolean?) {
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
null -> "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_8(x: Any?) {
|
||||
val y: Any
|
||||
when (x) {
|
||||
is Boolean? -> y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
null -> "false"
|
||||
}
|
||||
else -> y = Any()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?): String {
|
||||
if (x is Boolean) {
|
||||
return when (x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 10
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-17694
|
||||
*/
|
||||
fun case_10(x: Any): String {
|
||||
if (x is Boolean?) {
|
||||
return when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 11
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30903
|
||||
*/
|
||||
fun case_11(x: Any?): String? {
|
||||
if (x is Nothing?) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 12
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30903
|
||||
*/
|
||||
fun case_12(x: Any?): String? {
|
||||
if (x == null) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 13
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30903
|
||||
*/
|
||||
fun case_13(x: Any?): String? {
|
||||
if (x === null) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 14
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-30903
|
||||
*/
|
||||
fun case_14(x: Any?): String? {
|
||||
x as Nothing?
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: Any) {
|
||||
x as EnumClass
|
||||
val y = when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(x: Any) {
|
||||
if (x is EnumClass?) {
|
||||
val y = when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
fun case_17(x: Any?) {
|
||||
x as EnumClass?
|
||||
val y = when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 18
|
||||
fun case_18(x: EnumClass?): Int {
|
||||
x!!
|
||||
return when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(x: Any): Int {
|
||||
if (x is EnumClass?) {
|
||||
return when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20(x: Any?) {
|
||||
x as EnumClass
|
||||
val y = when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21(x: EnumClass?): Int {
|
||||
if (x !== null) {
|
||||
return when(x) {
|
||||
EnumClass.NORTH -> 1
|
||||
EnumClass.SOUTH -> 2
|
||||
EnumClass.WEST -> 3
|
||||
EnumClass.EAST -> 4
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(x: Boolean?) {
|
||||
x!!
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(x: Any?) {
|
||||
x as Boolean?
|
||||
if (x != null) {
|
||||
val y = when(x) {
|
||||
true -> "true"
|
||||
false -> "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun case_24(x: Any) {
|
||||
x as SealedClass
|
||||
val y = when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(x: Any) {
|
||||
if (x is SealedClass?) {
|
||||
val y = when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(x: Any?) {
|
||||
x as SealedClass?
|
||||
val y = when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 27
|
||||
fun case_27(x: SealedClass?): Int {
|
||||
x!!
|
||||
return when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 28
|
||||
fun case_28(x: Any): Int {
|
||||
if (x is SealedClass?) {
|
||||
return when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 29
|
||||
fun case_29(x: Any?) {
|
||||
x as SealedClass
|
||||
val y = when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 30
|
||||
fun case_30(x: SealedClass?): Int {
|
||||
if (x !== null) {
|
||||
return when(x) {
|
||||
is SealedChild1 -> 1
|
||||
is SealedChild2 -> 2
|
||||
is SealedChild3 -> 3
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 31
|
||||
fun case_31(x: Any) {
|
||||
x as SealedClassWithObjects
|
||||
val y = when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 32
|
||||
fun case_32(x: Any) {
|
||||
if (x is SealedClassWithObjects?) {
|
||||
val y = when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 33
|
||||
fun case_33(x: Any?) {
|
||||
x as SealedClassWithObjects?
|
||||
val y = when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 34
|
||||
fun case_34(x: SealedClassWithObjects?): Int {
|
||||
x!!
|
||||
return when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 35
|
||||
fun case_35(x: Any): Int {
|
||||
if (x is SealedClassWithObjects?) {
|
||||
return when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
null -> 5
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 36
|
||||
fun case_36(x: Any?) {
|
||||
x as SealedClassWithObjects
|
||||
val y = when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 37
|
||||
fun case_37(x: SealedClassWithObjects?): Int {
|
||||
if (x !== null) {
|
||||
return when(x) {
|
||||
SealedWithObjectsChild1 -> 1
|
||||
SealedWithObjectsChild2 -> 2
|
||||
SealedWithObjectsChild3 -> 3
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 63
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-24901
|
||||
*/
|
||||
fun case_1(x: String?) {
|
||||
when {
|
||||
x == null -> return
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: String?) {
|
||||
when {
|
||||
x == null -> return
|
||||
else -> println(1)
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-24901
|
||||
*/
|
||||
fun case_3(x: String?) {
|
||||
when (x) {
|
||||
null -> return
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: String?) {
|
||||
when (x) {
|
||||
null -> return
|
||||
else -> println(1)
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: String?) {
|
||||
when (x) {
|
||||
null -> throw Exception()
|
||||
else -> println(1)
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-24901
|
||||
*/
|
||||
fun case_6(x: String?) {
|
||||
when (x) {
|
||||
null -> throw Exception()
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>x<!>.length
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 64
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-16373
|
||||
*/
|
||||
class Case1<T> {
|
||||
fun getT(): T = TODO()
|
||||
fun getTN(): T? = null
|
||||
|
||||
fun get(): T {
|
||||
var x = getTN()
|
||||
if (x == null) {
|
||||
x = getT()
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & T?")!>x<!>
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class Case2 {
|
||||
fun getInt(): Int = 10
|
||||
fun getIntN(): Int? = null
|
||||
|
||||
fun get(): Int {
|
||||
var x = getIntN()
|
||||
if (x == null) {
|
||||
x = getInt()
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(10)
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-16373
|
||||
*/
|
||||
class Case3<T> {
|
||||
fun getT(): T = TODO()
|
||||
fun getTN(): T? = null
|
||||
|
||||
fun get(): T {
|
||||
var x = getTN()
|
||||
x = x ?: getT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & T?")!>x<!>
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
class Case4 {
|
||||
fun getInt(): Int = 10
|
||||
fun getIntN(): Int? = null
|
||||
|
||||
fun get(): Int {
|
||||
var x = getIntN()
|
||||
x = x ?: getInt()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(10)
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
class Case5<T> {
|
||||
fun getT(): T = TODO()
|
||||
fun getTN(): T? = null
|
||||
|
||||
fun get(): T {
|
||||
var x = getTN()
|
||||
x = if (x == null) getT() else x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & T?")!>x<!>
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
class Case6 {
|
||||
fun getInt(): Int = 10
|
||||
fun getIntN(): Int? = null
|
||||
|
||||
fun get(): Int {
|
||||
var x = getIntN()
|
||||
x = if (x == null) getInt() else x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(10)
|
||||
return x
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any?")!>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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>?.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any?) {
|
||||
if (x !is Pair<*, *>) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>.first
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x !is Pair<*, *>?) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>?.first
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
when (x) {
|
||||
!is Pair<*, *> -> throw Exception()
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>.first
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>.first
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10(x: Any?) {
|
||||
when (x) {
|
||||
!is Pair<*, *>? -> return
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>?.first
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>?.first
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
when {
|
||||
x !is Pair<*, *> -> throw Exception()
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>.first
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Any?")!>x<!>.first
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: Any?) {
|
||||
when {
|
||||
x !is Pair<*, *>? -> return
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>?.first
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>? & kotlin.Any?")!>x<!>?.first
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 66
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
if (x !is Nothing?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_2(x: Pair<*, *>?) {
|
||||
if (x is Nothing?) return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_3(x: Any?) {
|
||||
if (x is Nothing?) throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_4(x: Pair<*, *>?) {
|
||||
when (x) {
|
||||
is Nothing? -> return
|
||||
else -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *>?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 5
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_5(x: Pair<*, *>?) {
|
||||
when (x) {
|
||||
!is Nothing? -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Pair<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Pair<*, *>?")!>x<!>.equals(10)
|
||||
}
|
||||
else -> return
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Pair<*, *>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Pair<*, *> & kotlin.Pair<*, *>?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 6
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-31053
|
||||
*/
|
||||
fun case_6(x: Any?) {
|
||||
when (x) {
|
||||
is Nothing? -> return
|
||||
is Any? -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(10)
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 67
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
when (x) {
|
||||
is Any -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
else -> return
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
inline fun <reified T : Any> case_2(x: Any?) {
|
||||
when (x) {
|
||||
is T -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
else -> return
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
inline fun <K : Any, reified T : K> case_3(x: Any?) {
|
||||
if (x is T) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.equals(10)
|
||||
} else throw Exception()
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T & kotlin.Any?")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// 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) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any?) {
|
||||
(x as Nothing?)!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x as Number? is Int) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
if (x as Class? is Class) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>prop_1<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (x as Nothing? is Nothing) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Any?")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Any?) {
|
||||
(x as String?)!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Any?) {
|
||||
if (x as String? != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x as String? == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>length<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 69
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-29083
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun test1(x: ClassLevel1?) {
|
||||
if (x!! is ClassLevel2) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel1?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel1?")!>x<!>.<!UNRESOLVED_REFERENCE!>test2<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any?) {
|
||||
(x as ClassLevel1?)!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>test1<!>()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(x: Any?) {
|
||||
if (x as ClassLevel1? is ClassLevel1) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & kotlin.Any?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>test1<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Any?) {
|
||||
if ((x as Class).prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & kotlin.Any?")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Class) {
|
||||
if (x!!.prop_8 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class & Class")!>x<!>.prop_8.<!INAPPLICABLE_CANDIDATE!>prop_8<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,569 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 7
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* HELPERS: classes, enumClasses, objects, typealiases, properties, functions
|
||||
*/
|
||||
|
||||
// FILE: other_package.kt
|
||||
|
||||
package orherpackage
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
class EmptyClass13 {}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
typealias TypealiasString14 = String?
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
import orherpackage.*
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x != null || x != null || x != null || x != null || x != null || x != null || x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28159
|
||||
*/
|
||||
fun case_2(x: Nothing?) {
|
||||
if (x !== null && x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
if (Object.prop_1 == null && Object.prop_1 == null)
|
||||
else {
|
||||
Object.prop_1
|
||||
Object.prop_1.equals(null)
|
||||
Object.prop_1.propT
|
||||
Object.prop_1.propAny
|
||||
Object.prop_1.propNullableT
|
||||
Object.prop_1.propNullableAny
|
||||
Object.prop_1.funT()
|
||||
Object.prop_1.funAny()
|
||||
Object.prop_1.funNullableT()
|
||||
Object.prop_1.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Char?) {
|
||||
if (x != null && true || x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
val x: Unit? = null
|
||||
|
||||
if (x !== null || x !== null && x !== null || x !== null && x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6(x: Class?) {
|
||||
val y = true
|
||||
|
||||
if (((false || x != null || false) && !y) || x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
val x: EmptyObject? = null
|
||||
if (x != null || x != null || <!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject?")!>x<!> != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject & EmptyObject?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasString) {
|
||||
if (x !== null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!> != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: TypealiasNullableString?) {
|
||||
if (x === null && x === null || x === null) {
|
||||
|
||||
} else if (x === null || x === null) {
|
||||
} else if (false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_10() {
|
||||
val a = Class()
|
||||
|
||||
if (a.prop_4 === null || a.prop_4 === null || true) {
|
||||
if (a.prop_4 != null) {
|
||||
a.prop_4
|
||||
a.prop_4.equals(null)
|
||||
a.prop_4.propT
|
||||
a.prop_4.propAny
|
||||
a.prop_4.propNullableT
|
||||
a.prop_4.propNullableAny
|
||||
a.prop_4.funT()
|
||||
a.prop_4.funAny()
|
||||
a.prop_4.funNullableT()
|
||||
a.prop_4.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: TypealiasNullableString?, y: TypealiasNullableString) {
|
||||
val t: TypealiasNullableString = null
|
||||
|
||||
if (x == null) {
|
||||
|
||||
} else {
|
||||
if (x != null) {
|
||||
if (y != null || y != null) {
|
||||
if (stringProperty == null && nullableNothingProperty == null) {
|
||||
if (t != null || t != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: TypealiasNullableString, y: TypealiasNullableString) = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>if (x == null) "1"
|
||||
else if (y === null || y === null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & TypealiasNullableString & TypealiasNullableString")!>x<!>
|
||||
} else "-1"<!>
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: orherpackage.EmptyClass13?, y: Nothing?) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13")!>if (x == null || x === y) {
|
||||
throw Exception()
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("orherpackage.EmptyClass13 & orherpackage.EmptyClass13?")!>x<!>
|
||||
}<!>
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14() {
|
||||
val a = Class()
|
||||
if (a.prop_6 != a.prop_7) {
|
||||
a.prop_6
|
||||
a.prop_6.equals(null)
|
||||
a.prop_6.propT
|
||||
a.prop_6.propAny
|
||||
a.prop_6.propNullableT
|
||||
a.prop_6.propNullableAny
|
||||
a.prop_6.funT()
|
||||
a.prop_6.funAny()
|
||||
a.prop_6.funNullableT()
|
||||
a.prop_6.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: TypealiasString?) {
|
||||
var y = null
|
||||
val t = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>if (x === null || x == y && x === y) "" else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString?")!>x<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16() {
|
||||
val x: TypealiasNothing? = null
|
||||
val y: Nothing? = null
|
||||
|
||||
if (x != null || x !== null || x != y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing?")!>x<!>.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (nullableIntProperty == null || nullableNothingProperty === nullableIntProperty) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>nullableIntProperty<!>
|
||||
}<!>
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 18
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28328
|
||||
*/
|
||||
fun case_18(a: DeepObject.A.B.C.D.E.F.G.J?, b: Nothing?) {
|
||||
if (a != null || b !== a || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 19
|
||||
fun case_19(b: Boolean) {
|
||||
val a = if (b) {
|
||||
object {
|
||||
var y = null
|
||||
val B19 = if (b) {
|
||||
object {
|
||||
val C19 = if (b) {
|
||||
object {
|
||||
val D19 = if (b) {
|
||||
object {
|
||||
val x: Number? = 10
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
}
|
||||
} else null
|
||||
|
||||
if (a != null && a.B19 != a.y && a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!> != a.y && a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!> != a.y && a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!> != a.y) {
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.equals(null)
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propT<!>
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.propAny
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>propNullableT<!>
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.propNullableAny
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funT<!>()
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.funAny()
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.<!INAPPLICABLE_CANDIDATE!>funNullableT<!>()
|
||||
a.B19.<!INAPPLICABLE_CANDIDATE!>C19<!>.<!UNRESOLVED_REFERENCE!>D19<!>.<!UNRESOLVED_REFERENCE!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 20
|
||||
fun case_20(b: Boolean) {
|
||||
val a = object {
|
||||
val y = null
|
||||
val B19 = object {
|
||||
val C19 = object {
|
||||
val D19 = if (b) {
|
||||
object {}
|
||||
} else null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a.B19.C19.D19 !== null || a.y != a.B19.C19.D19) {
|
||||
a.B19.C19.D19
|
||||
a.B19.C19.D19.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
a.B19.C19.D19.propT
|
||||
a.B19.C19.D19.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
a.B19.C19.D19.propNullableT
|
||||
a.B19.C19.D19.propNullableAny
|
||||
a.B19.C19.D19.funT()
|
||||
a.B19.C19.D19.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
a.B19.C19.D19.funNullableT()
|
||||
a.B19.C19.D19.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21() {
|
||||
val y = null
|
||||
if (EnumClassWithNullableProperty.A.prop_1 !== null && y != EnumClassWithNullableProperty.A.prop_1) {
|
||||
EnumClassWithNullableProperty.A.prop_1
|
||||
EnumClassWithNullableProperty.A.prop_1.equals(null)
|
||||
EnumClassWithNullableProperty.A.prop_1.propT
|
||||
EnumClassWithNullableProperty.A.prop_1.propAny
|
||||
EnumClassWithNullableProperty.A.prop_1.propNullableT
|
||||
EnumClassWithNullableProperty.A.prop_1.propNullableAny
|
||||
EnumClassWithNullableProperty.A.prop_1.funT()
|
||||
EnumClassWithNullableProperty.A.prop_1.funAny()
|
||||
EnumClassWithNullableProperty.A.prop_1.funNullableT()
|
||||
EnumClassWithNullableProperty.A.prop_1.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(a: (() -> Unit)?) {
|
||||
var y = null
|
||||
if (a != null || y != a) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!><!INAPPLICABLE_CANDIDATE!>a<!>()<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(a: ((Float) -> Int?)?, b: Float?, c: Nothing?) {
|
||||
if (a != null && b !== null || a != c && b !== c) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!><!INAPPLICABLE_CANDIDATE!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!>)<!>
|
||||
if (x != null || c !== x) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propT<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.<!INAPPLICABLE_CANDIDATE!>propNullableT<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funT<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.<!INAPPLICABLE_CANDIDATE!>funNullableT<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun case_24(a: ((() -> Unit) -> Unit)?, b: (() -> Unit)?) =
|
||||
if (a !== null && b !== null || implicitNullableNothingProperty != a && nullableNothingProperty !== b) {
|
||||
<!INAPPLICABLE_CANDIDATE!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>?")!>a<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.<!INAPPLICABLE_CANDIDATE!>propAny<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.<!INAPPLICABLE_CANDIDATE!>funAny<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>.funNullableAny()
|
||||
} else null
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(b: Boolean) {
|
||||
val x = {
|
||||
if (b) object {
|
||||
val a = 10
|
||||
val b = null
|
||||
} else null
|
||||
}
|
||||
|
||||
val y = if (b) x else null
|
||||
|
||||
if (y !== null || x()!!.b != y) {
|
||||
if (x()!!.b != y) {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!><!INAPPLICABLE_CANDIDATE!>y<!>()<!>
|
||||
|
||||
if (z != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.<!UNRESOLVED_REFERENCE!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function0.invoke]")!>z<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: ((Float) -> Int?)?, b: Float?) {
|
||||
var c: Nothing? = null
|
||||
|
||||
if (a != null == true && b != null == true || c != a == true && b != c == true) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!><!INAPPLICABLE_CANDIDATE!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!>)<!>
|
||||
if (x != null == true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke] & ERROR CLASS: Inapplicable(WRONG_RECEIVER): [kotlin/Function1.invoke]")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 27
|
||||
fun case_27(y: Nothing?) {
|
||||
if (Object.prop_1 == null == true == true == true == true == true == true == true == true == true == true == true == true == true == true || y == Object.prop_1 == true == true == true == false == false)
|
||||
else {
|
||||
Object.prop_1
|
||||
Object.prop_1.equals(null)
|
||||
Object.prop_1.propT
|
||||
Object.prop_1.propAny
|
||||
Object.prop_1.propNullableT
|
||||
Object.prop_1.propNullableAny
|
||||
Object.prop_1.funT()
|
||||
Object.prop_1.funAny()
|
||||
Object.prop_1.funNullableT()
|
||||
Object.prop_1.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
//TESTCASE NUMBER: 28
|
||||
fun case_28(a: DeepObject.A.B.C.D.E.F.G.J?) =
|
||||
if (a != null == true == false == false == false == true == false == true == false == false == true == true && a.x !== nullableNothingProperty) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.x
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
} else -1
|
||||
|
||||
// TESTCASE NUMBER: 29
|
||||
fun case_29(a: Int?, b: Nothing?, c: Int = if (a === b) 0 else a) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>b<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 30
|
||||
fun case_30(a: Int?, b: Nothing?, c: Int = if (a === b || a == null) 0 else a) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>b<!>
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 70
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* ISSUES: KT-11727
|
||||
*/
|
||||
fun case_1(): Int? {
|
||||
val x: Int? = null
|
||||
return when (x != null) {
|
||||
true -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.inv()
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* ISSUES: KT-11727
|
||||
*/
|
||||
fun case_2(): Int? {
|
||||
val x: Int? = null
|
||||
return when (x != null) {
|
||||
false -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-11727
|
||||
*/
|
||||
fun case_3(): Int? {
|
||||
val x: Int? = null
|
||||
return when (x == null) {
|
||||
false -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-11727
|
||||
*/
|
||||
fun case_4(): Int? {
|
||||
val x: Int? = null
|
||||
return when (x == null) {
|
||||
true -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 71
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-19446
|
||||
*/
|
||||
fun case_1() {
|
||||
run {
|
||||
var unit: Unit? = Unit
|
||||
while (unit != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>unit<!>
|
||||
<!UNRESOLVED_REFERENCE!>consume<!>(unit)
|
||||
unit = null
|
||||
}
|
||||
}
|
||||
|
||||
run {
|
||||
var unit: Unit? = Unit
|
||||
while (unit != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit?")!>unit<!>
|
||||
<!UNRESOLVED_REFERENCE!>consume<!>(unit)
|
||||
unit = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-10420
|
||||
*/
|
||||
fun case_2(): Int {
|
||||
fun b(): Int {
|
||||
var c: Int? = null
|
||||
if (c == null || 0 < c) c = 0
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>c<!>
|
||||
return c ?: 0
|
||||
}
|
||||
|
||||
var c: Int = 0
|
||||
c = 0
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>c<!>
|
||||
return c
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 72
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-19446
|
||||
*/
|
||||
fun case_1() {
|
||||
val list = mutableListOf<String>()
|
||||
val ints = list as MutableList<Int>
|
||||
val strs = list as MutableList<String>
|
||||
strs.add("two")
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int> & kotlin.collections.MutableList<kotlin.String> & kotlin.collections.MutableList<kotlin.String>")!>list<!>
|
||||
val s: String = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int> & kotlin.collections.MutableList<kotlin.String> & kotlin.collections.MutableList<kotlin.String>")!>list<!>[0]
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !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: 73
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, objects, typealiases, functions, enumClasses, interfaces, sealedClasses
|
||||
*/
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 1
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-14257
|
||||
*/
|
||||
fun case_1(x: Any?) {
|
||||
x is ClassLevel1 || return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>.test1()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-14257
|
||||
*/
|
||||
fun case_2(x: Any?) {
|
||||
x !is ClassLevel1 && return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>.test1()
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 3
|
||||
* ISSUES: KT-14257
|
||||
*/
|
||||
fun case_3(x: Any?) {
|
||||
x as? ClassLevel1 ?: return
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?")!>x<!>.test1()
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 8
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: properties, classes, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Inv<Int>?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(a: Inv<Inv<Inv<Inv<Inv<Inv<Int?>?>?>?>?>?>?) {
|
||||
if (a != null) {
|
||||
val b = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<Inv<Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?>?>?> & Inv<Inv<Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?>?>?>?")!>a<!>.get()
|
||||
if (b != null) {
|
||||
val c = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?>?> & Inv<Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?>?>?")!>b<!>.get()
|
||||
if (c != null) {
|
||||
val d = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?> & Inv<Inv<Inv<Inv<kotlin.Int?>?>?>?>?")!>c<!>.get()
|
||||
if (d != null) {
|
||||
val e = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<Inv<Inv<kotlin.Int?>?>?> & Inv<Inv<Inv<kotlin.Int?>?>?>?")!>d<!>.get()
|
||||
if (e != null) {
|
||||
val f = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<Inv<kotlin.Int?>?> & Inv<Inv<kotlin.Int?>?>?")!>e<!>.get()
|
||||
if (f != null) {
|
||||
val g = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int?> & Inv<kotlin.Int?>?")!>f<!>.get()
|
||||
if (g != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(a: Inv<Int>?) {
|
||||
if (a != null) {
|
||||
val b = a
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>")!>b<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(a: Inv<Int>?, b: Inv<Int> = if (a != null) <!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>a<!> else Inv<Int>()) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>")!>b<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5() {
|
||||
if (nullableOut != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int> & Out<kotlin.Int>?")!>nullableOut<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6() {
|
||||
val x: Inv<Int>? = null
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
var x: Inv<Int>? = null
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int> & Inv<kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: ClassWithThreeTypeParameters<Int?, Short?, ClassWithThreeTypeParameters<Int?, Short?, String?>?>?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?> & ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, ClassWithThreeTypeParameters<kotlin.Int?, kotlin.Short?, kotlin.String?>?>?")!>x<!>.funNullableAny()
|
||||
if (x.x != null) {
|
||||
x.x
|
||||
x.x.equals(null)
|
||||
x.x.propT
|
||||
x.x.propAny
|
||||
x.x.propNullableT
|
||||
x.x.propNullableAny
|
||||
x.x.funT()
|
||||
x.x.funAny()
|
||||
x.x.funNullableT()
|
||||
x.x.funNullableAny()
|
||||
}
|
||||
if (x.y != null) {
|
||||
x.y
|
||||
x.y.equals(null)
|
||||
x.y.propT
|
||||
x.y.propAny
|
||||
x.y.propNullableT
|
||||
x.y.propNullableAny
|
||||
x.y.funT()
|
||||
x.y.funAny()
|
||||
x.y.funNullableT()
|
||||
x.y.funNullableAny()
|
||||
}
|
||||
if (x.z != null) {
|
||||
x.z
|
||||
x.z.equals(null)
|
||||
x.z.propT
|
||||
x.z.propAny
|
||||
x.z.propNullableT
|
||||
x.z.propNullableAny
|
||||
x.z.funT()
|
||||
x.z.funAny()
|
||||
x.z.funNullableT()
|
||||
x.z.funNullableAny()
|
||||
if (x.z.x != null) {
|
||||
x.z.x
|
||||
x.z.x.equals(null)
|
||||
x.z.x.propT
|
||||
x.z.x.propAny
|
||||
x.z.x.propNullableT
|
||||
x.z.x.propNullableAny
|
||||
x.z.x.funT()
|
||||
x.z.x.funAny()
|
||||
x.z.x.funNullableT()
|
||||
x.z.x.funNullableAny()
|
||||
}
|
||||
if (x.z.y != null && x.z.z != null) {
|
||||
x.z.y
|
||||
x.z.y.equals(null)
|
||||
x.z.y.propT
|
||||
x.z.y.propAny
|
||||
x.z.y.propNullableT
|
||||
x.z.y.propNullableAny
|
||||
x.z.y.funT()
|
||||
x.z.y.funAny()
|
||||
x.z.y.funNullableT()
|
||||
x.z.y.funNullableAny()
|
||||
x.z.z
|
||||
x.z.z.equals(null)
|
||||
x.z.z.propT
|
||||
x.z.z.propAny
|
||||
x.z.z.propNullableT
|
||||
x.z.z.propNullableAny
|
||||
x.z.z.funT()
|
||||
x.z.z.funAny()
|
||||
x.z.z.funNullableT()
|
||||
x.z.z.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,717 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: dfa
|
||||
* NUMBER: 9
|
||||
* DESCRIPTION: Raw data flow analysis test
|
||||
* HELPERS: classes, properties, functions
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Out<out Int?>?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 2
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28598
|
||||
*/
|
||||
fun case_2(a: Out<out Out<out Out<out Out<out Out<out Out<out Int?>?>?>?>?>?>?) {
|
||||
if (a != null) {
|
||||
val b = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?> & Out<out Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?>?")!>a<!>.get()
|
||||
if (b != null) {
|
||||
val c = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?> & Out<out Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?>?")!>b<!>.get()
|
||||
if (c != null) {
|
||||
val d = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?> & Out<out Out<out Out<out Out<out kotlin.Int?>?>?>?>?")!>c<!>.get()
|
||||
if (d != null) {
|
||||
val e = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out Out<out kotlin.Int?>?>?> & Out<out Out<out Out<out kotlin.Int?>?>?>?")!>d<!>.get()
|
||||
if (e != null) {
|
||||
val f = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out Out<out kotlin.Int?>?> & Out<out Out<out kotlin.Int?>?>?")!>e<!>.get()
|
||||
if (f != null) {
|
||||
val g = <!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int?> & Out<out kotlin.Int?>?")!>f<!>.get()
|
||||
if (g != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(a: Inv<out Int>?) {
|
||||
if (a != null) {
|
||||
val b = a
|
||||
if (a == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int>")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>")!>b<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(a: Out<out Int>?, b: Out<out Int> = if (a != null) <!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>a<!> else Out<Int>()) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int>")!>b<!>.funNullableAny()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
val x: Out<out Int>? = null
|
||||
|
||||
fun case_5() {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
fun case_6() {
|
||||
val x: Inv<out Int>? = null
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
var x: Out<out Int>? = null
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<out kotlin.Int> & Out<out kotlin.Int>?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 8
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-25432
|
||||
*/
|
||||
fun case_8(x: ClassWithThreeTypeParameters<out Int?, out Short?, ClassWithThreeTypeParameters<out Int?, out Short?, out String?>?>?) {
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?> & ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, ClassWithThreeTypeParameters<out kotlin.Int?, out kotlin.Short?, out kotlin.String?>?>?")!>x<!>.funNullableAny()
|
||||
if (x.x != null) {
|
||||
x.x
|
||||
x.x.equals(null)
|
||||
x.x.propT
|
||||
x.x.propAny
|
||||
x.x.propNullableT
|
||||
x.x.propNullableAny
|
||||
x.x.funT()
|
||||
x.x.funAny()
|
||||
x.x.funNullableT()
|
||||
x.x.funNullableAny()
|
||||
}
|
||||
if (x.y != null) {
|
||||
x.y
|
||||
x.y.equals(null)
|
||||
x.y.propT
|
||||
x.y.propAny
|
||||
x.y.propNullableT
|
||||
x.y.propNullableAny
|
||||
x.y.funT()
|
||||
x.y.funAny()
|
||||
x.y.funNullableT()
|
||||
x.y.funNullableAny()
|
||||
}
|
||||
if (x.z != null) {
|
||||
x.z
|
||||
x.z.equals(null)
|
||||
x.z.propT
|
||||
x.z.propAny
|
||||
x.z.propNullableT
|
||||
x.z.propNullableAny
|
||||
x.z.funT()
|
||||
x.z.funAny()
|
||||
x.z.funNullableT()
|
||||
x.z.funNullableAny()
|
||||
if (x.z.x != null) {
|
||||
x.z.x
|
||||
x.z.x.equals(null)
|
||||
x.z.x.propT
|
||||
x.z.x.propAny
|
||||
x.z.x.propNullableT
|
||||
x.z.x.propNullableAny
|
||||
x.z.x.funT()
|
||||
x.z.x.funAny()
|
||||
x.z.x.funNullableT()
|
||||
x.z.x.funNullableAny()
|
||||
}
|
||||
if (x.z.y != null && x.z.z != null) {
|
||||
x.z.y
|
||||
x.z.z
|
||||
x.z.y.equals(null)
|
||||
x.z.y.propT
|
||||
x.z.y.propAny
|
||||
x.z.y.propNullableT
|
||||
x.z.y.propNullableAny
|
||||
x.z.y.funT()
|
||||
x.z.y.funAny()
|
||||
x.z.y.funNullableT()
|
||||
x.z.y.funNullableAny()
|
||||
x.z.z.equals(null)
|
||||
x.z.z.propT
|
||||
x.z.z.propAny
|
||||
x.z.z.propNullableT
|
||||
x.z.z.propNullableAny
|
||||
x.z.z.funT()
|
||||
x.z.z.funAny()
|
||||
x.z.z.funNullableT()
|
||||
x.z.z.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(a: (Inv<out Int>) -> Inv<out Int>?, b: Inv<out Int>?) {
|
||||
if (b != null) {
|
||||
val c = a(b)
|
||||
if (c != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int> & Inv<out kotlin.Int>?")!>c<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
fun case_9(a: Inv<*>?) {
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_10() {
|
||||
val a10: Out<*>? = null
|
||||
|
||||
if (a10 != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Out<*> & Out<*>?")!>a10<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_11() {
|
||||
val a: In<*>? = null
|
||||
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("In<*> & In<*>?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(a: ClassWithSixTypeParameters<*, *, *, *, *, *>?) {
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
fun case_14(a: ClassWithSixTypeParameters<*, Int, *, Out<*>, *, Map<Float, Out<*>>>?) {
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>> & ClassWithSixTypeParameters<*, kotlin.Int, *, Out<*>, *, kotlin.collections.Map<kotlin.Float, Out<*>>>?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(a: Any?) {
|
||||
if (a is ClassWithSixTypeParameters<*, *, *, *, *, *>?) {
|
||||
if (a != null) {
|
||||
a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 16
|
||||
fun case_16(a: Any?) {
|
||||
if (a === null) {
|
||||
} else {
|
||||
if (a !is ClassWithSixTypeParameters<*, *, *, *, *, *>?) {
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 17
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28598
|
||||
*/
|
||||
fun case_17(a: Inv<out Out<Out<Out<Out<Out<Int?>?>?>?>?>?>?) {
|
||||
if (a != null) {
|
||||
val b = <!DEBUG_INFO_EXPRESSION_TYPE("Inv<out Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?>?> & Inv<out Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?>?>?")!>a<!>.get()
|
||||
if (b != null) {
|
||||
val c = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?> & Out<Out<Out<Out<Out<kotlin.Int?>?>?>?>?>?")!>b<!>.get()
|
||||
if (c != null) {
|
||||
val d = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<Out<kotlin.Int?>?>?>?> & Out<Out<Out<Out<kotlin.Int?>?>?>?>?")!>c<!>.get()
|
||||
if (d != null) {
|
||||
val e = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<Out<kotlin.Int?>?>?> & Out<Out<Out<kotlin.Int?>?>?>?")!>d<!>.get()
|
||||
if (e != null) {
|
||||
val f = <!DEBUG_INFO_EXPRESSION_TYPE("Out<Out<kotlin.Int?>?> & Out<Out<kotlin.Int?>?>?")!>e<!>.get()
|
||||
if (f != null) {
|
||||
val g = <!DEBUG_INFO_EXPRESSION_TYPE("Out<kotlin.Int?> & Out<kotlin.Int?>?")!>f<!>.get()
|
||||
if (g != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>g<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 18
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_18(a: Inv<out Int?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 19
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_19(a: Inv<out Nothing?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 20
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_20(a: Inv<out Any?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 21
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_21(a: Out<out Int?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 22
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_22(a: Out<out Nothing?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 23
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_23(a: Out<out Any?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun case_24(a: Out<Int?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 25
|
||||
fun case_25(a: Out<Nothing?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: Out<Any?>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 27
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_27(a: Inv<in Any>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 28
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_28(a: Inv<in Float>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 29
|
||||
* UNEXPECTED BEHAVIOUR
|
||||
* ISSUES: KT-28785
|
||||
*/
|
||||
fun case_29(a: Inv<in Nothing>) {
|
||||
if (a.x != null) {
|
||||
a.x
|
||||
a.x.equals(null)
|
||||
a.x.propT
|
||||
a.x.propAny
|
||||
a.x.propNullableT
|
||||
a.x.propNullableAny
|
||||
a.x.funT()
|
||||
a.x.funAny()
|
||||
a.x.funNullableT()
|
||||
a.x.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 30
|
||||
fun case_30() {
|
||||
val a = In<Number?>()
|
||||
val b = a.getWithUpperBoundT<Int?>(10)
|
||||
|
||||
if (b != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>b<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 31
|
||||
fun case_31(y: Inv<Int?>) {
|
||||
val x = y.get()
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 32
|
||||
fun case_32(y: Inv<Int>) {
|
||||
val x = y.getNullable()
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 33
|
||||
fun case_33(y: Inv<Int>) {
|
||||
val x = y.getNullable()
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 34
|
||||
fun case_34(y: Inv<Int>) {
|
||||
val x = y.getNullable()
|
||||
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user