jeremy
02/15/2019, 2:57 AMfun <T: Somethingable> String.buildSomething(): T {
return T.buildSomethingFromString(this)
}
The only way to get buildSomethingFromString is to have a interface Somethingable have a default implementation in a companion object. But then I lose compile time checking for overriding implementation on T. I thought I could be specific on the extension for each concrete impl, but I can’t redefine String.buildSomething(): Impl1 and String.buildSomething(): Impl2 without changing the name.