This works, but if I remove the SchematicCompanion supertype, the compilation fails. The problem is that the compiler plugin does not handle properly the existing companion (it should add the supertype in FIR).
The current workaround is to add the companion supertype manually.
class Session : Schematic<Session>() {
var uuid by uuid<ServiceContext>()
var securityCode by string()
val createdAt by instant()
var vmCreatedAt by long()
var lastActivity by long()
var principal by uuid<Principal>().nullable()
var roles by uuidList<Role>()
companion object : SchematicCompanion<Session> {
val SESSION_TOKEN_UUID = UUID<Session>("7fdd494f-e542-4d5b-870b-7cab83dc3197")
val LOGOUT_TOKEN_UUID = UUID<Session>("61e974dc-094b-42e8-b21c-08502be7c595")
}
}
This works, but if I remove the
SchematicCompanion
supertype, the compilation fails. The problem is that the compiler plugin does not handle properly the existing companion (it should add the supertype in FIR).The current workaround is to add the companion supertype manually.