Hullaballoonatic
06/24/2019, 7:35 PMinterface Foo<F: Foo<F>>
I'm always confused by when I can define a type as
interface Foo<F: Foo<F>> {
val incorrect: F // why can I almost never define it like this?
val correct: Foo<F> // why does the type require Foo<F>, when F is already Foo<F>?
}
streetsofboston
06/24/2019, 7:47 PMinterface Foo<F: Foo<F>> {
val incorrect: F // why can I almost never define it like this?
val correct: Foo<F> // why does the type require Foo<F>, when F is already Foo<F>?
}
class FooImpl: Foo<FooImpl> {
override val incorrect: FooImpl get() = TODO("not implemented")
override val correct: Foo<FooImpl> get() = TODO("not implemented")
}