FIR DFA: smartcast variable to Nothing? on null assignment
In order to make resolution still work for members not available from `Nothing`, we track the type without `Nothing?` and use that for resolution instead.
This commit is contained in:
committed by
teamcityserver
parent
7e2f15f532
commit
4726dcce40
Vendored
+6
-3
@@ -1,3 +1,4 @@
|
||||
// FIR_IDE_IGNORE
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// SKIP_TXT
|
||||
|
||||
@@ -10,13 +11,15 @@ fun case_1(value_1: Any?) {
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(value_1: Int?) {
|
||||
funWithReturnsAndInvertCondition(value_1 != null)
|
||||
println(value_1<!UNSAFE_CALL!>.<!>inc())
|
||||
println(value_1.inc()) // inc resolves to compiler/tests-spec/testData/diagnostics/helpers/classes.kt which accepts `Class?`
|
||||
println(value_1<!UNSAFE_CALL!>.<!>unaryPlus())
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(value_1: Int?) {
|
||||
funWithReturns(value_1 == null)
|
||||
println(value_1<!UNSAFE_CALL!>.<!>inc())
|
||||
println(value_1.inc()) // inc resolves to compiler/tests-spec/testData/diagnostics/helpers/classes.kt which accepts `Class?`
|
||||
println(value_1<!UNSAFE_CALL!>.<!>unaryPlus())
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
@@ -43,7 +46,7 @@ object case_7_object {
|
||||
}
|
||||
fun case_7() {
|
||||
funWithReturns(case_7_object.prop_1 == null)
|
||||
case_7_object.prop_1<!UNSAFE_CALL!>.<!>inc()
|
||||
case_7_object.prop_1.inc() // inc resolves to compiler/tests-spec/testData/diagnostics/helpers/classes.kt which accepts `Class?`
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
|
||||
+3
@@ -1,3 +1,4 @@
|
||||
// FIR_IDE_IGNORE
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// SKIP_TXT
|
||||
|
||||
@@ -20,12 +21,14 @@ fun case_1(value_1: Any?) {
|
||||
fun case_2(value_1: Int?) {
|
||||
funWithReturnsAndInvertCondition(value_1 != null)
|
||||
println(value_1<!UNSAFE_CALL!>.<!>inc())
|
||||
println(value_1<!UNSAFE_CALL!>.<!>unaryPlus())
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3(value_1: Int?) {
|
||||
funWithReturns(value_1 == null)
|
||||
println(value_1<!UNSAFE_CALL!>.<!>inc())
|
||||
println(value_1<!UNSAFE_CALL!>.<!>unaryPlus())
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
|
||||
Vendored
+1
-1
@@ -116,7 +116,7 @@ fun case_5(value_1: Number?, value_2: String?) {
|
||||
fun case_6(value_1: Number, value_2: String?, value_3: Any?) {
|
||||
when (value_3.case_6(value_1, value_2)) {
|
||||
true -> {
|
||||
println(value_3<!UNSAFE_CALL!>.<!>equals(""))
|
||||
println(value_3.equals("")) // OK because `value_3` is `Nothing?` and `equals` resolves to `kotlin/text/equals`, which has `String?` as receiver type.
|
||||
println(value_2<!UNSAFE_CALL!>.<!>length)
|
||||
}
|
||||
false -> {
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ fun case_5(value_1: Number?, value_2: String?) {
|
||||
fun case_6(value_1: Number, value_2: String?, value_3: Any?) {
|
||||
when (value_3.case_6(value_1, value_2)) {
|
||||
true -> {
|
||||
println(value_3.equals(""))
|
||||
println(value_3.equals("")) // OK because `value_3` is `Nothing?` and `equals` resolves to `kotlin/text/equals`, which has `String?` as receiver type.
|
||||
println(value_2<!UNSAFE_CALL!>.<!>length)
|
||||
}
|
||||
false -> {
|
||||
|
||||
@@ -87,7 +87,7 @@ fun case_6(x: EmptyClass?) {
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
if (nullableNumberProperty != null || <!EQUALITY_NOT_APPLICABLE!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Number?")!>nullableNumberProperty<!> != null is Boolean<!>) {
|
||||
if (nullableNumberProperty != null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Nothing?")!>nullableNumberProperty<!> != null is Boolean) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!>.propT
|
||||
@@ -262,8 +262,8 @@ fun case_16() {
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
val case_17 = if (nullableIntProperty == null == true == false) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>nullableIntProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>nullableIntProperty<!>.<!UNRESOLVED_REFERENCE!>java<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>nullableIntProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>nullableIntProperty<!><!UNSAFE_CALL!>.<!>java
|
||||
}
|
||||
|
||||
//TESTCASE NUMBER: 18
|
||||
@@ -440,18 +440,18 @@ fun case_25(b: Boolean) {
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: ((Float) -> Int?)?, b: Float?) {
|
||||
if (a != null == true == false && b != null == true == false) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!><!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Float?")!>b<!>)<!>
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!><!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Nothing?")!>b<!>)<!>
|
||||
if (x != null == true === false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!><!UNSAFE_CALL!>.<!>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<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ fun case_4() {
|
||||
var x: Boolean? = true
|
||||
if (<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!> != null) {
|
||||
false || when { else -> {x = null; true} }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ fun case_3() {
|
||||
var x: Boolean? = true
|
||||
if (x != null) {
|
||||
false || when { else -> { x = null; true} }
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ fun case_4() {
|
||||
fun case_5() {
|
||||
var x: Boolean? = true
|
||||
if (x != null) {
|
||||
when { else -> { x = null; false} } || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
when { else -> { x = null; false} } || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ fun case_1(x: ClassWithCustomEquals) {
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: ClassWithCustomEquals) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & ClassWithCustomEquals")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & ClassWithCustomEquals")!>x<!>.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & kotlin.Nothing")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ fun case_6(x: ClassWithCustomEquals) {
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: ClassWithCustomEquals) {
|
||||
if ((x != null) == false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & ClassWithCustomEquals")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & ClassWithCustomEquals")!>x<!>.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithCustomEquals & kotlin.Nothing")!>x<!>.inv()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ fun case_4(x: Any) {
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (!(x !is Nothing?)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,16 +61,16 @@ fun case_7(x: Any) {
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (!(x is Nothing?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>?.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: Any?) {
|
||||
if (!!(x !is Nothing?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ fun case_10(x: Any?) {
|
||||
// TESTCASE NUMBER: 11
|
||||
fun case_11(x: Any?) {
|
||||
if (x is Nothing?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>?.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>?.<!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class Case1 {
|
||||
val y = this
|
||||
if (y.x != null) {
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>
|
||||
this.x
|
||||
y.x
|
||||
y.x<!UNSAFE_CALL!>.<!>inv()
|
||||
|
||||
@@ -31,8 +31,8 @@ inline fun <reified T, reified K> case_3() {
|
||||
var x: T? = 10 as T
|
||||
x = null
|
||||
if (x is K) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & T?!! & K!!")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & T?!! & K!!")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Nothing")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Nothing")!>x<!>
|
||||
println(1)
|
||||
}
|
||||
}
|
||||
@@ -61,8 +61,8 @@ inline fun <reified T, reified K> case_6() {
|
||||
var x: T? = 10 as T
|
||||
if (x is K) {
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!><!UNSAFE_CALL!>.<!>equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("T? & kotlin.Nothing?")!>x<!>
|
||||
println(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ fun case_1(a: Any?) {
|
||||
if (true) continue
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>a<!><!UNSAFE_CALL!>.<!>equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>a<!><!UNSAFE_CALL!>.<!>equals(10)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
|
||||
@@ -12,8 +12,8 @@ fun stringArg(number: String) {}
|
||||
*/
|
||||
fun case_1(x: Int?) {
|
||||
if (x == null) {
|
||||
stringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x!!<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>
|
||||
stringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x!!<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ fun case_2(x: Int?, y: Nothing?) {
|
||||
fun case_3(x: Int?) {
|
||||
if (x == null) {
|
||||
x as Int
|
||||
stringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>
|
||||
stringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ fun case_3(x: Int?) {
|
||||
fun case_4(x: Int?) {
|
||||
if (x == null) {
|
||||
x!!
|
||||
stringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>
|
||||
stringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ fun case_5(x: Int?) {
|
||||
if (x == null) {
|
||||
var y = x
|
||||
y!!
|
||||
stringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>y<!>
|
||||
stringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>y<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>y<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ fun nullableStringArg(number: String?) {}
|
||||
*/
|
||||
fun case_1(x: Int?) {
|
||||
if (x == null) {
|
||||
nullableStringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>)
|
||||
nullableStringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ fun case_2(x: Int?, y: Nothing?) {
|
||||
*/
|
||||
fun case_3(x: Int?) {
|
||||
if (x == null) {
|
||||
nullableStringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>)
|
||||
nullableStringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ fun case_3(x: Int?) {
|
||||
*/
|
||||
fun case_4(x: Int?) {
|
||||
if (x == null) {
|
||||
nullableStringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>)
|
||||
nullableStringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,6 @@ fun case_4(x: Int?) {
|
||||
fun case_5(x: Int?) {
|
||||
if (x == null) {
|
||||
var y = x
|
||||
nullableStringArg(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>y<!>)
|
||||
nullableStringArg(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>y<!>)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,8 +106,8 @@ fun case_9() {
|
||||
x = null
|
||||
break
|
||||
} while (x!!.length > 1)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 10
|
||||
@@ -117,8 +117,8 @@ fun case_10() {
|
||||
x = null
|
||||
break
|
||||
} while ((x as String).length > 1)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String")!>x<!>.length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>.length
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
@@ -128,8 +128,8 @@ fun case_11() {
|
||||
x = null
|
||||
break
|
||||
} while (x!!)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Boolean")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Boolean")!>x<!>.not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing")!>x<!>.not()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
@@ -141,8 +141,8 @@ fun case_12() {
|
||||
x = null
|
||||
break
|
||||
} while (true && x!!)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
@@ -154,8 +154,8 @@ fun case_13() {
|
||||
x = null
|
||||
break
|
||||
} while (false && x!!)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
@@ -167,8 +167,8 @@ fun case_14() {
|
||||
x = null
|
||||
break
|
||||
} while (true || x!!)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
@@ -180,8 +180,8 @@ fun case_15() {
|
||||
x = null
|
||||
break
|
||||
} while (!(false && x!!))
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>not()
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -37,8 +37,8 @@ fun case_3() {
|
||||
var x: String?
|
||||
x = "Test"
|
||||
println("${try { } finally { x = null }}")
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -76,8 +76,8 @@ fun case_6() {
|
||||
var x: String?
|
||||
x = "Test"
|
||||
println("${try { } catch (e: Exception) { } finally { x = null }}")
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -115,6 +115,6 @@ fun case_9() {
|
||||
var x: String?
|
||||
x = "Test"
|
||||
println("${when (null) { else -> x = null } }")
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ fun case_1() {
|
||||
break@outer
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -32,8 +32,8 @@ fun case_2() {
|
||||
break@outer
|
||||
}
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -145,8 +145,8 @@ fun case_9() {
|
||||
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<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +158,8 @@ fun case_10() {
|
||||
inner@ do {
|
||||
x = null
|
||||
} while (true)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ fun case_11() {
|
||||
x = null
|
||||
break
|
||||
} while (x == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ fun case_12() {
|
||||
while (true) {
|
||||
y += if (x == null) break else 10
|
||||
}
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!><!UNSAFE_CALL!>.<!>inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>inv()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
|
||||
@@ -122,7 +122,7 @@ fun case_6(x: EmptyClass?) {
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
if (nullableNumberProperty != null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Number?")!>nullableNumberProperty<!> != null) {
|
||||
if (nullableNumberProperty != null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Nothing?")!>nullableNumberProperty<!> != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Number")!>nullableNumberProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Number")!>nullableNumberProperty<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Number")!>nullableNumberProperty<!>.propT
|
||||
@@ -1302,11 +1302,11 @@ open class Case29(a: Int?, val b: Float?, private val c: Unit?, protected val d:
|
||||
if (w != null || this.w != null) this.w
|
||||
|
||||
s = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) this.s
|
||||
}
|
||||
|
||||
@@ -2346,11 +2346,11 @@ sealed class Case30(a: Int?, val b: Float?, private val c: Unit?, protected val
|
||||
if (w != null || this.w != null) this.w
|
||||
|
||||
s = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) this.s
|
||||
}
|
||||
|
||||
@@ -3391,11 +3391,11 @@ enum class Case31(a: Int?, val b: Float?, private val c: Unit?, protected val d:
|
||||
if (w != null || this.w != null) this.w
|
||||
|
||||
s = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) this.s
|
||||
}
|
||||
|
||||
@@ -4039,11 +4039,11 @@ object Case32 {
|
||||
if (w != null || this.w != null) this.w
|
||||
|
||||
s = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>s<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>.hashCode()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>s<!>
|
||||
if (s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>s<!>
|
||||
if (s != null || this.s != null) this.s
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ fun case_11(b: Boolean) {
|
||||
if (z != null || b) {
|
||||
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & <anonymous>?")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & kotlin.Nothing?")!>z<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@ import otherpackage.*
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any?) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Nothing?) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ fun case_3() {
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Char?) {
|
||||
if (x == null && true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char? & kotlin.Char?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ fun case_4(x: Char?) {
|
||||
fun case_5() {
|
||||
val x: Unit? = null
|
||||
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit? & kotlin.Unit?")!>x<!>
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
@@ -54,7 +54,7 @@ fun case_6(x: EmptyClass?) {
|
||||
val y = true
|
||||
|
||||
if (x == null && !y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass? & EmptyClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@ fun case_7() {
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasNullableString) {
|
||||
if (x == null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & TypealiasNullableString")!>x<!> == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & TypealiasNullableString")!>x<!>
|
||||
if (x == null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & kotlin.Nothing?")!>x<!> == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -105,7 +105,7 @@ fun case_11(x: TypealiasNullableString?, y: TypealiasNullableString) {
|
||||
if (y == null) {
|
||||
if (nullableStringProperty != null) {
|
||||
if (z == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString? & TypealiasNullableString?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,7 @@ fun case_14() {
|
||||
// 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 & TypealiasNullableString")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString & kotlin.Nothing?")!>x<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
@@ -187,13 +187,13 @@ fun case_16() {
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>if (nullableIntProperty !== null) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>nullableIntProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>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? & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J? & kotlin.Nothing?")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,17 +249,17 @@ fun case_21() {
|
||||
// TESTCASE NUMBER: 22
|
||||
fun case_22(a: (() -> Unit)?) {
|
||||
if (a == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>? & kotlin.Function0<kotlin.Unit>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>? & kotlin.Nothing?")!>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?>? & kotlin.Function1<kotlin.Float, kotlin.Int?>?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Float?")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Nothing?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Nothing?")!>b<!>
|
||||
if (a != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Function1<kotlin.Float, kotlin.Int?>")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Float, kotlin.Int?>? & kotlin.Nothing")!>a<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,13 +290,13 @@ fun case_25(b: Boolean) {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!>y()<!>
|
||||
|
||||
if (z == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & <anonymous>?")!>z<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & kotlin.Nothing?")!>z<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: Int?, b: Int? = if (a !== null) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>a<!>) {
|
||||
fun case_26(a: Int?, b: Int? = if (a !== null) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>a<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>b<!>
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ fun case_9(x: Boolean?) {
|
||||
while (x ?: return)
|
||||
while (x == null)
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Boolean")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean? & kotlin.Boolean")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@ import otherpackage.*
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1(x: Any) {
|
||||
if (x === null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Nothing) {
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ fun case_3() {
|
||||
// TESTCASE NUMBER: 4
|
||||
fun case_4(x: Char) {
|
||||
if (x == null && true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Char")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Char & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ fun case_4(x: Char) {
|
||||
fun case_5() {
|
||||
val x: Unit = kotlin.Unit
|
||||
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Unit")!>x<!>
|
||||
if (x == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
@@ -57,7 +57,7 @@ fun case_6(x: EmptyClass) {
|
||||
val y = true
|
||||
|
||||
if (x == null && !y) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass & EmptyClass")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyClass & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ fun case_7() {
|
||||
|
||||
// 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<!>
|
||||
if (x == null && <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!> == null) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString")!>x<!>
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
@@ -78,7 +78,7 @@ fun case_9(x: TypealiasString) {
|
||||
if (x != null) {
|
||||
|
||||
} else if (false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ fun case_11(x: TypealiasString, y: TypealiasString) {
|
||||
if (y == null) {
|
||||
if (stringProperty != null) {
|
||||
if (false || false || false || z == null || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & TypealiasString")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -112,14 +112,14 @@ fun case_11(x: TypealiasString, y: TypealiasString) {
|
||||
|
||||
// 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 & TypealiasString")!>x<!>
|
||||
else if (y !== null) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasString & kotlin.Nothing")!>x<!>
|
||||
else "-1"<!>
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: otherpackage.EmptyClass13) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (x != null) {
|
||||
1
|
||||
} else <!DEBUG_INFO_EXPRESSION_TYPE("otherpackage.EmptyClass13 & otherpackage.EmptyClass13")!>x<!><!>
|
||||
} else <!DEBUG_INFO_EXPRESSION_TYPE("otherpackage.EmptyClass13 & kotlin.Nothing")!>x<!><!>
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
class A14 {
|
||||
@@ -179,7 +179,7 @@ fun case_16() {
|
||||
val x: TypealiasNothing = return
|
||||
|
||||
if (x == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing & TypealiasNothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (true && true && in
|
||||
//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 & DeepObject.A.B.C.D.E.F.G.J")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & kotlin.Nothing")!>a<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ fun case_22(a: (() -> Unit)) {
|
||||
// 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 & kotlin.Float")!>b<!>)<!>
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Nothing")!>b<!>)<!>
|
||||
if (x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x<!>
|
||||
}
|
||||
@@ -276,13 +276,13 @@ fun case_24(a: ((() -> Unit) -> Unit), b: (() -> Unit)) {
|
||||
}
|
||||
|
||||
// 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> & kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit>")!>a<!> else {{}}) {
|
||||
fun case_25(a: (() -> Unit) -> Unit, b: (() -> Unit) -> Unit = if (a == null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function1<kotlin.Function0<kotlin.Unit>, kotlin.Unit> & kotlin.Nothing")!>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 & kotlin.Int")!>a<!> else 0) {
|
||||
fun case_26(a: Int, b: Int = if (a === null) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Nothing")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
}
|
||||
|
||||
@@ -133,10 +133,10 @@ fun case_13(x: Any?) {
|
||||
*/
|
||||
fun case_14(x: Any?) {
|
||||
if (x == null) {
|
||||
<!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!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>?.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,10 +147,10 @@ fun case_14(x: Any?) {
|
||||
*/
|
||||
fun case_15(x: Any?) {
|
||||
if (x !== null) else {
|
||||
<!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!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>?.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x!!<!>.equals(10)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing")!>x<!>.equals(10)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ fun case_1(x: Int?) = x
|
||||
fun case_1() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
case_1(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>case_1<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
@@ -21,7 +21,7 @@ fun case_2(x: Nothing?) = x
|
||||
fun case_2() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
case_2(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
case_2(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
@@ -29,7 +29,7 @@ fun case_3(x: String?) = x
|
||||
fun case_3() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
case_3(<!ARGUMENT_TYPE_MISMATCH, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>)
|
||||
case_3(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -42,7 +42,7 @@ fun Int?.case_4() = this
|
||||
fun case_4() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.<!OVERLOAD_RESOLUTION_AMBIGUITY!>case_4<!>()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 5
|
||||
@@ -51,7 +51,7 @@ fun Nothing?.case_5() = this
|
||||
fun case_5() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_5()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.case_5()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 6
|
||||
@@ -59,7 +59,7 @@ 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<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.case_6()
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -72,7 +72,7 @@ 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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.<!OVERLOAD_RESOLUTION_AMBIGUITY!>case_7<!>()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
@@ -81,7 +81,7 @@ 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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.case_8()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
@@ -89,7 +89,7 @@ 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<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.case_9()
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -102,7 +102,7 @@ fun <T : <!FINAL_UPPER_BOUND!>Int<!>> T?.case_10() = this
|
||||
fun case_10() {
|
||||
var x: Int? = 10
|
||||
x = null
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>.case_10()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.<!OVERLOAD_RESOLUTION_AMBIGUITY!>case_10<!>()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 11
|
||||
@@ -110,5 +110,5 @@ fun <T : <!FINAL_UPPER_BOUND!>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<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.case_11()
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ 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<!>)
|
||||
val z = case_2(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing")!>x<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>z<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ fun case_1() {
|
||||
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
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String? & kotlin.Nothing")!>x<!>.length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ fun case_10(x: Any): String {
|
||||
*/
|
||||
fun case_11(x: Any?): String? {
|
||||
if (x is Nothing?) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ fun case_11(x: Any?): String? {
|
||||
*/
|
||||
fun case_12(x: Any?): String? {
|
||||
if (x == null) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ fun case_12(x: Any?): String? {
|
||||
*/
|
||||
fun case_13(x: Any?): String? {
|
||||
if (x === null) {
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ fun case_13(x: Any?): String? {
|
||||
*/
|
||||
fun case_14(x: Any?): String? {
|
||||
x as Nothing?
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(x) {
|
||||
return when(x) {
|
||||
null -> null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ fun case_1(x: Any?) {
|
||||
// TESTCASE NUMBER: 2
|
||||
fun case_2(x: Any?) {
|
||||
(x as Nothing?)!!
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!><!UNSAFE_CALL{LT}!>.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!><!UNRESOLVED_REFERENCE{LT}!>inv<!>()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
@@ -37,8 +37,8 @@ fun case_4(x: Any?) {
|
||||
// TESTCASE NUMBER: 5
|
||||
fun case_5(x: Any?) {
|
||||
if (x as Nothing? is Nothing) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any?")!>x<!><!UNSAFE_CALL{LT}!>.<!><!UNRESOLVED_REFERENCE!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!><!UNRESOLVED_REFERENCE{LT}!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ fun case_1(x: Any?) {
|
||||
*/
|
||||
fun case_2(x: Nothing?) {
|
||||
if (x !== null && x !== null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,16 +81,16 @@ 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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ fun case_6(x: Class?) {
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
val x: EmptyObject? = null
|
||||
if (x != null || x != null || <!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject? & EmptyObject?")!>x<!> != null) {
|
||||
if (x != null || x != null || <!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject? & kotlin.Nothing?")!>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
|
||||
|
||||
@@ -25,7 +25,7 @@ fun case_2(): Int? {
|
||||
val x: Int? = null
|
||||
return when (x != null) {
|
||||
false -> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
@@ -53,7 +53,7 @@ fun case_4(): 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.Nothing?")!>x<!>
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
|
||||
@@ -57,16 +57,16 @@ 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()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<kotlin.Int>? & kotlin.Nothing")!>b<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ fun case_3(a: Inv<out Int>?) {
|
||||
if (a != null) {
|
||||
val b = a
|
||||
if (a == null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int>? & Inv<out kotlin.Int>")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<out kotlin.Int>? & kotlin.Nothing")!>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
|
||||
|
||||
Reference in New Issue
Block a user