[FE 1.0] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types

^KT-47709 In Progress
This commit is contained in:
Dmitriy Novozhilov
2021-07-13 12:29:54 +03:00
committed by teamcityserver
parent 85c7f386eb
commit ef635f6a96
35 changed files with 930 additions and 44 deletions
@@ -109,7 +109,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) {
// TESTCASE NUMBER: 5
fun case_5(value_1: Number?, value_2: String?) {
when (value_2.case_5(value_1)) {
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (value_2.case_5(value_1)) {
true -> {
println(value_2<!UNSAFE_CALL!>.<!>length)
println(value_1<!UNSAFE_CALL!>.<!>toByte())
@@ -114,7 +114,7 @@ fun case_4(value_1: Number, value_2: (() -> Unit)?) {
* ISSUES: KT-26612
*/
fun case_5(value_1: Number?, value_2: String?) {
when (value_2.case_5(value_1)) {
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (value_2.case_5(value_1)) {
true -> {
println(value_2<!UNSAFE_CALL!>.<!>length)
println(<!DEBUG_INFO_SMARTCAST!>value_1<!>.toByte())