Hello everyone. I have the following common code :...
# multiplatform
c
Hello everyone. I have the following common code :
Copy code
interface SomeInterface {
  @get:Throws(SomeException::class)
  val something: Something
}
On jvm it compiles well, but the native compiler gives me the error:
This annotation is not applicable to target 'member property without backing field or delegate' and use site target '@get'
How to overcome this limitation? Is there a corresponding YouTrack issue? Thanks.
a
Sorry for not answering your question, but please mind that this probably violates coding conventions - properties shouldn't throw - https://kotlinlang.org/docs/coding-conventions.html#functions-vs-properties
c
Thanks. Yes, this convention makes sense.