[FIR] Fix exhaustiveness checking for conditions with equals to object
#KT-37488 Fixed
This commit is contained in:
-20
@@ -1,20 +0,0 @@
|
||||
sealed class Sealed {
|
||||
object First: Sealed()
|
||||
sealed class NonFirst {
|
||||
object Second: NonFirst()
|
||||
object Third: NonFirst()
|
||||
object Fourth: Sealed()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(s: Sealed, nf: Sealed.NonFirst): Int {
|
||||
val si = when(s) {
|
||||
Sealed.First -> 1
|
||||
Sealed.NonFirst.Fourth -> 4
|
||||
}
|
||||
val nfi = when(nf) {
|
||||
Sealed.NonFirst.Second -> 2
|
||||
Sealed.NonFirst.Third -> 3
|
||||
}
|
||||
return si <!UNRESOLVED_REFERENCE!>+<!> nfi
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
sealed class Sealed {
|
||||
object First: Sealed()
|
||||
sealed class NonFirst {
|
||||
|
||||
Reference in New Issue
Block a user