Getting this new warning after updating to Kotlin 1.5.20:
JvmField cannot be applied to a property of an inline class type. This warning will become an error in further releases
I didn't see this mentioned anywhere in the release notes (or the GitHub release). Is there something pointing to this?
a
Alexey Belkov [JB]
06/25/2021, 10:34 AM
I think the warning was added in https://youtrack.jetbrains.com/issue/KT-32753 but I'm not sure it's specifically related to inline classes. Can you share a code sample to reproduce?
@Alexey Belkov [JB] this might be unrelated to that (or a bug) because it's happening on a property in the primary constructor, but it's not overriding anything:
Copy code
private inner class FindQuery<out T : Any>(
@JvmField
public val forId: WaitlistSurveySubmissionId,
mapper: (SqlCursor) -> T
) : Query<T>(find, mapper) {
public override fun execute(): SqlCursor = driver.executeQuery(1040459002,
"""SELECT * FROM WaitlistSurveySubmission WHERE id = ?""", 1) {
bindString(1, database.WaitlistSurveySubmissionAdapter.idAdapter.encode(forId))
}
public override fun toString(): String = "WaitlistSurveySubmission.sq:find"
}