Annotations on another annotation constructor parameters (e.g. @Nonbinding)


I was writing up a CDI Interceptor Binding and I used the annotation @javax.enterprise.util.Nonbinding on my annotation`s constructor parameter, like this:

annotation class Transactional(@Nonbinding val value: TransactionalModes = COMMIT)

But the target site of @Nonbinding is METHOD only. So I had to change it to:

annotation class Transactional(@get:Nonbinding val value: TransactionalModes = COMMIT)

But the interceptor didn’t work. Then I rewrote the @Transactional annotation using Java and it worked as expected. I compared the decompiled binaries and realized the Kotlin version of the annotation didn’t have the annotation (@Nonbinding) on the annotation value.

Could it be a bug or (probably) am I missing something? :slight_smile:

Looks like a bug to me. Could you please file a YouTrack issue?

Absolutely. Thank you for the quick response! :smiley:

Just for the record, it seems there’s already a bug filed, coincidentally using the same example: