[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
@@ -7,19 +7,19 @@ val test1: (String) -> Boolean =
val test2: (String) -> Boolean =
when {
true -> {{ true }}
true -> <!NI;TYPE_MISMATCH!>{{ true }}<!>
else -> null!!
}
val test3: (String) -> Boolean =
when {
true -> { <!UNUSED_ANONYMOUS_PARAMETER!>s<!> -> true }
true -> <!NI;TYPE_MISMATCH!>{ <!UNUSED_ANONYMOUS_PARAMETER!>s<!> -> true }<!>
else -> null!!
}
val test4: (String) -> Boolean =
when {
true -> <!NI;TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!><!UNUSED_ANONYMOUS_PARAMETER!>s1<!>, <!CANNOT_INFER_PARAMETER_TYPE, UNUSED_ANONYMOUS_PARAMETER!>s2<!><!> -> true }<!>
true -> <!NI;TYPE_MISMATCH!>{ <!OI;EXPECTED_PARAMETERS_NUMBER_MISMATCH!><!UNUSED_ANONYMOUS_PARAMETER!>s1<!>, <!OI;CANNOT_INFER_PARAMETER_TYPE, UNUSED_ANONYMOUS_PARAMETER!>s2<!><!> -> true }<!>
else -> null!!
}
@@ -6,7 +6,7 @@ val <!OI;IMPLICIT_NOTHING_PROPERTY_TYPE!>test1<!> = when {
}
val test1a: () -> Boolean = when {
true -> { { true } }
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
else -> TODO()
}
@@ -33,7 +33,7 @@ val <!OI;IMPLICIT_NOTHING_PROPERTY_TYPE!>test3<!> = when {
}
val test3a: () -> Boolean = when {
true -> { { true } }
true -> { { true } }
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
true -> <!NI;TYPE_MISMATCH!>{ { true } }<!>
else -> TODO()
}