[FIR] Fix false negative sealed diagnostics

... in presence of typealiases.

#KT-61921
This commit is contained in:
Kirill Rakhman
2023-09-14 10:52:09 +02:00
committed by Space Team
parent 36c0c2c76b
commit 2d4646a285
6 changed files with 12 additions and 105 deletions
+3
View File
@@ -1,4 +1,6 @@
// FIR_IDENTICAL
typealias TA = Sealed
sealed class Sealed {
object First: Sealed()
open class NonFirst: Sealed() {
@@ -6,6 +8,7 @@ sealed class Sealed {
object Third: NonFirst()
fun foo(): Int {
val s = object: <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>Sealed<!>() {}
val s2 = object: <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>TA<!>() {}
class Local: <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>Sealed<!>() {}
return s.hashCode()
}