[FIR] Report NON_EXHAUSTIVE_WHEN_STATEMENT/NO_ELSE_IN_WHEN for when's on logical types
^KT-47709 In Progress
This commit is contained in:
committed by
teamcityserver
parent
ef635f6a96
commit
a6edd852ff
+1
-1
@@ -6,7 +6,7 @@
|
||||
fun case_1(value_1: EnumClass?) {
|
||||
val value_2: Int
|
||||
|
||||
when (value_1) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (value_1) {
|
||||
EnumClass.NORTH -> funWithExactlyOnceCallsInPlace { value_2 = 1 }
|
||||
EnumClass.SOUTH -> funWithExactlyOnceCallsInPlace { value_2 = 2 }
|
||||
EnumClass.EAST -> funWithExactlyOnceCallsInPlace { value_2 = 4 }
|
||||
|
||||
Vendored
+1
-1
@@ -100,7 +100,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.toByte())
|
||||
|
||||
Vendored
+1
-1
@@ -105,7 +105,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.length)
|
||||
println(value_1.toByte())
|
||||
|
||||
Reference in New Issue
Block a user