I would love if this was possible: ``` interface F...
# language-proposals
I would love if this was possible:
Copy code
interface FooModel {
    fun a(): Int
    fun b(): String

interface Creator<T : FooModel> {
    fun create(a: Int, b: String): T

abstract class Foo : FooModel {
    companion object : Creator<Foo> by ::AutoValue_Foo
    // Type mismatch: inferred type is KFunction2<String!, Int, AutoValue_Foo> but Creator<Foo> was expected
Right now the workaround is creating a Java method like
Copy code
static <T extends FooModel> wrap(Creator<T> creator) {
    return creator;
and then doing
Copy code
Creator<Foo> by wrap(::AutoValue_Foo)