This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
[Annotation Processor] - Currently is possible to register more than one TypeAdapter for the same type. #1702
Labels
bug
Something isn't working
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Currently is possible to register more than one TypeAdapter for the same type. This can lead to unwanted behavior.
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
Annotation processor should break the build with compilation error. It should show an error message informing what are the TypeAdapters that are registered for the same type.
Code example, screenshot, or link to a repository:
@RegisterBeagleAdapter
class ModuleTypeAdapter : BeagleTypeAdapter {
override fun fromJson(json: String): Int {}
override fun toJson(type: Int): String {}
}
@RegisterBeagleAdapter
class AppTypeAdapter : BeagleTypeAdapter {
override fun fromJson(json: String): Int {}
override fun toJson(type: Int): String {}
}
The text was updated successfully, but these errors were encountered: