Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unrecognized modifier when annotation is commented out #892

Open
paranoidmonoid opened this issue Oct 27, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@paranoidmonoid
Copy link
Contributor

Describe the bug
When a class has multiple annotations but one is commented out the comment is still considered as entry and running the code throws java.lang.IllegalStateException: Unrecognized modifier: //@SerializeWithStrategy(SerializationStrategy.KebabCase)
See branch-reproducer for precise setup

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/paranoidmonoid/kotlin-serial-name/tree/reproducer-unrecognized-modifier
  2. Run Main
  3. See console output

Expected behavior
The commented lines are ignored

Environment (please complete the following information):

  • KOTLIN_VERSION=1.5.31
  • JVM_TARGET_VERSION=1.8
  • ARROW_VERSION=1.0.0
  • ARROW_META_VERSION=1.5.0-RC-SNAPSHOT
  • Kotlin: 212-1.5.31-release-546-IJ4638.7
@paranoidmonoid paranoidmonoid added the bug Something isn't working label Oct 27, 2021
@serras
Copy link
Member

serras commented Jan 13, 2022

@paranoidmonoid could you try with an updated version of the Kotlin compiler? Unfortunately we get the entries directly from the compiler AST, so I see little we can do ourselves to fix the problem (but if in a new Kotlin version the problem persists, I'm more than happy to raise it myself to the Jetbrains people if you prefer not to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants