[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
Vendored
+1
-1
@@ -27,7 +27,7 @@ fun test_2(cond: Boolean?) {
|
||||
}
|
||||
|
||||
fun test_3(cond: Boolean) {
|
||||
when (cond) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (cond) {
|
||||
true -> 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ fun test_2(enum: SomeEnum?) {
|
||||
}
|
||||
|
||||
fun test_3(enum: SomeEnum) {
|
||||
when (enum) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (enum) {
|
||||
SomeEnum.A -> 1
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -44,7 +44,7 @@ fun test_2(base: Base?) {
|
||||
}
|
||||
|
||||
fun test_3(base: Base) {
|
||||
when (base) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (base) {
|
||||
is A -> 1
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ typealias TA = A<CharSequence>
|
||||
fun bar(): TA = TODO()
|
||||
|
||||
fun foo() {
|
||||
when (val a = bar()) {
|
||||
<!NON_EXHAUSTIVE_WHEN_STATEMENT!>when<!> (val a = bar()) {
|
||||
is A.B -> a.x.length
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user