[Parcelize] Ignore all sealed classes in Parcelize FIR generator
Sealed classes are inherently abstract and should not have Parcelable functions added via the FIR declaration generator. #KT-59112 Fixed
This commit is contained in:
@@ -11,6 +11,7 @@ import android.os.Parcelable
|
||||
sealed class Foo : Parcelable {
|
||||
data class A(val x: Int) : Foo()
|
||||
object B : Foo()
|
||||
sealed class Inner : Foo()
|
||||
}
|
||||
|
||||
data class C(val x: String) : Foo()
|
||||
|
||||
@@ -15,6 +15,9 @@ class Final(val foo: String) : Parcelable
|
||||
@Parcelize
|
||||
sealed class Sealed(val foo: String) : Parcelable {
|
||||
class X : Sealed("")
|
||||
sealed class Inner : Sealed("") {
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class Y<!> : Inner()
|
||||
}
|
||||
}
|
||||
|
||||
class Outer {
|
||||
|
||||
@@ -15,6 +15,9 @@ class Final(val foo: String) : Parcelable
|
||||
@Parcelize
|
||||
sealed class Sealed(val foo: String) : Parcelable {
|
||||
class X : Sealed("")
|
||||
sealed class Inner : Sealed("") {
|
||||
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class Y<!> : Inner()
|
||||
}
|
||||
}
|
||||
|
||||
class Outer {
|
||||
|
||||
Reference in New Issue
Block a user