arrow-meta icon indicating copy to clipboard operation
arrow-meta copied to clipboard

[BUG] Unrecognized modifier when annotation is commented out

Open paranoidmonoid opened this issue 4 years ago • 1 comments

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 avatar Oct 27 '21 15:10 paranoidmonoid

@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).

serras avatar Jan 13 '22 08:01 serras