[NI] Don't discriminate Nothing-type from resulting ones

^KT-32106 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-21 13:28:05 +03:00
committed by Pavel Kirpichenkov
parent a8e9a6a1d0
commit ae1630f376
21 changed files with 55 additions and 32 deletions
@@ -385,7 +385,7 @@ fun case_13(b: Boolean, c: Boolean, d: Boolean) {
* ISSUES: KT-28329
*/
fun case_14(z: Boolean?) {
if (true && true && true && true && EnumClassWithNullableProperty.B.prop_1 != null || z != null || <!ALWAYS_NULL!>z<!>!! && true && true) {
if (true && true && true && true && EnumClassWithNullableProperty.B.prop_1 != null || z != null || <!ALWAYS_NULL!>z<!>!! <!UNREACHABLE_CODE!>&& true && true<!>) {
} else {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>EnumClassWithNullableProperty.B.prop_1<!>
@@ -123,8 +123,8 @@ fun case_8(x: Any?, z: Any) {
// TESTCASE NUMBER: 9
fun case_9(x: Any?, z: Any) {
var y = select(x) ?: return null!!
z == y || throw null!!
var y = select(x) ?: <!UNREACHABLE_CODE!>return<!> null!!
z == y || <!UNREACHABLE_CODE!>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)
@@ -285,7 +285,7 @@ fun case_24(a: ((() -> Unit) -> Unit), b: (() -> Unit)) {
}
// TESTCASE NUMBER: 25
fun case_25(a: (() -> Unit) -> Unit, b: (() -> Unit) -> Unit = if (<!SENSELESS_COMPARISON!>a == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("(() -> kotlin.Unit) -> kotlin.Unit & kotlin.Nothing")!>a<!> else {{}}) {
fun case_25(a: (() -> Unit) -> Unit, b: (() -> Unit) -> Unit = if (<!SENSELESS_COMPARISON!>a == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("(() -> kotlin.Unit) -> kotlin.Unit & kotlin.Nothing"), DEBUG_INFO_SMARTCAST!>a<!> else <!TYPE_MISMATCH!>{{}}<!>) {
<!DEBUG_INFO_EXPRESSION_TYPE("(() -> kotlin.Unit) -> kotlin.Unit")!>a<!>
<!DEBUG_INFO_EXPRESSION_TYPE("(() -> kotlin.Unit) -> kotlin.Unit")!>b<!>
}
@@ -686,7 +686,7 @@ fun case_33(a: ((Float) -> Int?)?, b: Float?, c: Boolean?) {
fun case_34(z1: Boolean?) {
var z = null
if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != <!DEBUG_INFO_CONSTANT!>implicitNullableNothingProperty<!> && <!SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== null<!> && EnumClassWithNullableProperty.A.prop_1 !== <!DEBUG_INFO_CONSTANT!>z<!> || z1 != <!DEBUG_INFO_CONSTANT!>implicitNullableNothingProperty<!> || <!ALWAYS_NULL!>z1<!>!! && true && true) {
if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != <!DEBUG_INFO_CONSTANT!>implicitNullableNothingProperty<!> && <!SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== null<!> && EnumClassWithNullableProperty.A.prop_1 !== <!DEBUG_INFO_CONSTANT!>z<!> || z1 != <!DEBUG_INFO_CONSTANT!>implicitNullableNothingProperty<!> || <!ALWAYS_NULL!>z1<!>!! <!UNREACHABLE_CODE!>&& true && true<!>) {
} else {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>EnumClassWithNullableProperty.A.prop_1<!>