-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fallback applyOn with Kotlin #588
Comments
The error makes it look like it's complaining that it's getting a lambda when it's expecting an array. I'm not too familiar with Kotlin, but this doc section Arrays as annotation parameters suggests that the syntax should be: Kotlin 1.2+
Older versions
|
Oh perfect, that works. Thanks for clearing that up. |
Happy to hear that 😃 |
When I use the applyOn parameter for @fallback in Kotlin:
@Fallback(fallbackMethod = "fallbackSaveCallEventBatch", applyOn = { SQLException::class })
I get two errors:
Annotation argument must be compile-time constant.
Type mismatch: inferred type is () -> KClass<SQLException> but Array<KClass<out Throwable!>> was expected.
Is there a correct way to do this in Kotlin, or would something have to be fixed?
The text was updated successfully, but these errors were encountered: