FIR: Fix test data for KT-13650 related test

Now, the behavior seems to be more correct then in FE 1.0
This commit is contained in:
Denis Zharkov
2020-06-03 10:38:21 +03:00
parent 7a22827af4
commit 19219c37b6
@@ -9,15 +9,15 @@
*/ */
fun case_1(x: Class?, y: Any) { fun case_1(x: Class?, y: Any) {
x?.prop_12 = if (y is String) "" else throw Exception() x?.prop_12 = if (y is String) "" else throw Exception()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.<!UNRESOLVED_REFERENCE!>toUpperCase<!>()
} }
// TESTCASE NUMBER: 2 // TESTCASE NUMBER: 2
fun case_2(x: Class?, y: Any) { fun case_2(x: Class?, y: Any) {
x?.prop_9 = y is String || return x?.prop_9 = y is String || return
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.<!UNRESOLVED_REFERENCE!>toUpperCase<!>()
} }
/* /*
@@ -27,8 +27,8 @@ fun case_2(x: Class?, y: Any) {
*/ */
fun case_3(x: Class?, y: Any) { fun case_3(x: Class?, y: Any) {
x?.prop_12 = y as String x?.prop_12 = y as String
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.<!UNRESOLVED_REFERENCE!>toUpperCase<!>()
} }
/* /*
@@ -38,8 +38,8 @@ fun case_3(x: Class?, y: Any) {
*/ */
fun case_4(x: Class?, y: Any) { fun case_4(x: Class?, y: Any) {
x?.prop_12 = y as? String ?: return x?.prop_12 = y as? String ?: return
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.Any")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.<!UNRESOLVED_REFERENCE!>toUpperCase<!>()
} }
/* /*
@@ -49,15 +49,15 @@ fun case_4(x: Class?, y: Any) {
*/ */
fun case_5(x: Class?, y: String?) { fun case_5(x: Class?, y: String?) {
x?.prop_12 = y ?: return x?.prop_12 = y ?: return
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>toUpperCase<!>()
} }
// TESTCASE NUMBER: 6 // TESTCASE NUMBER: 6
fun case_6(x: Class?, y: String?) { fun case_6(x: Class?, y: String?) {
x?.prop_9 = y !is String && throw Exception() x?.prop_9 = y !is String && throw Exception()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>toUpperCase<!>()
} }
/* /*
@@ -67,8 +67,8 @@ fun case_6(x: Class?, y: String?) {
*/ */
fun case_7(x: Class?, y: String?) { fun case_7(x: Class?, y: String?) {
x?.prop_12 = y!! x?.prop_12 = y!!
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>toUpperCase<!>()
} }
/* /*
@@ -78,6 +78,6 @@ fun case_7(x: Class?, y: String?) {
*/ */
fun case_8(x: Class?, y: String?) { fun case_8(x: Class?, y: String?) {
x?.prop_12 = if (y === null) throw Exception() else "" x?.prop_12 = if (y === null) throw Exception() else ""
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & kotlin.String?")!>y<!>.toUpperCase() <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String?")!>y<!>.<!INAPPLICABLE_CANDIDATE!>toUpperCase<!>()
} }