kotlinx.serialization
kotlinx.serialization copied to clipboard
`@KeepGeneratedSerializer ` cannot be used with `typealias`
Describe the bug
When I have
internal typealias DependencyMap = @Serializable(DependencyMapSerializer::class) Map<String, Dependency>
I'd expect to be able to do
internal typealias DependencyMap = @Serializable(DependencyMapSerializer::class) @KeepGeneratedSerializer Map<String, Dependency>
but that does not compile, saying WRONG_ANNOTATION_TARGET.
Environment
- Kotlin version: 2.0.21
- Library version: 1.7.3
- Kotlin platforms: JVM
- Gradle version: 8.10.2