jlleitschuh
07/03/2018, 3:34 PMfun <T> T.validateAndParse(json: String) : Any? where T: FromJsonString<*>, T: JsonSchema {
TODO()
}
val fromJson : FromJsonString<*>? = type.companionObjectInstance as? FromJsonString<*>
if (fromJson is JsonSchema) {
// The compiler can't find `validateAndParse` even though the type should be a union of FromJsonString<*> & JsonSchema
fromJson.validateAndParse(context.call.receiveText())
}
Is there a workaround I can use to call validateAndParse
?