martmists
12/14/2021, 11:45 PMfun <R> convertTo(): R {
return convertImpl()
}
fun convertImpl(): Int {
// ...
}
fun convertImpl(): String {
// ...
}
Is there an easy way to do it or will I have to just use a when statement and make R reified and add a branch for each implemented type?Joffrey
12/15/2021, 12:12 AMwhen
on the reified R
class.