Skip to content

Breaking Instant class deprecation: new replaced class should be also serializable #565

@orchestr7

Description

@orchestr7

@SinceKotlin("2.1") we are suggested to migrate to kotlin.time.Instant:

@Deprecated(
    "Use kotlin.time.Instant instead",
    ReplaceWith("kotlin.time.Instant", "kotlin.time.Instant"),
    level = DeprecationLevel.WARNING
)
@Serializable(with = InstantSerializer::class)
public expect class Instant : Comparable<Instant> {

But this class is npt serializable:

@SinceKotlin("2.1")
@ExperimentalTime
public class Instant internal constructor(
Image

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions