2ae2f09fee
Phase COMPILER_REQUIRED_ANNOTATIONS causes errors in the kotlinx serialization tests: org.jetbrains.kotlin.fir.symbols.FirLazyResolveContractViolationException: `lazyResolveToPhase(COMPILER_REQUIRED_ANNOTATIONS)` cannot be called from a transformer with a phase COMPILER_REQUIRED_ANNOTATIONS. `lazyResolveToPhase` can be called only from a transformer with a phase which is strictly greater than a requested phase; i.e., `lazyResolveToPhase(A)` may be only called from a lazy transformer with a phase B, where A < B. This is a contract of lazy resolve
39 lines
816 B
Kotlin
Vendored
39 lines
816 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// SKIP_TXT
|
|
|
|
// FILE: test.kt
|
|
import kotlinx.serialization.*
|
|
|
|
class Bar
|
|
|
|
<!COMPANION_OBJECT_AS_CUSTOM_SERIALIZER_DEPRECATED!>@Serializable<!>
|
|
class Foo1 {
|
|
@Serializer(Foo1::class)
|
|
companion object
|
|
}
|
|
|
|
@Serializable
|
|
class Foo2 {
|
|
<!COMPANION_OBJECT_SERIALIZER_INSIDE_OTHER_SERIALIZABLE_CLASS!>@Serializer(Bar::class)<!>
|
|
companion object
|
|
}
|
|
|
|
@Serializer(Foo3::class)
|
|
object Foo3Ser
|
|
|
|
@Serializable(Foo3Ser::class)
|
|
class Foo3 {
|
|
<!COMPANION_OBJECT_SERIALIZER_INSIDE_OTHER_SERIALIZABLE_CLASS!>@Serializer(Bar::class)<!>
|
|
companion object
|
|
}
|
|
|
|
@Serializable(Foo4.Companion::class)
|
|
class Foo4 {
|
|
@Serializer(Foo4::class)
|
|
companion object
|
|
}
|
|
|
|
class NonSerializableFoo {
|
|
<!COMPANION_OBJECT_SERIALIZER_INSIDE_NON_SERIALIZABLE_CLASS!>@Serializer(Bar::class)<!>
|
|
companion object
|
|
} |