I have a hard time wrapping my head around a diffe...
# getting-started
h
I have a hard time wrapping my head around a difference between
F
and
Foo<F>
here:
Copy code
interface Foo<F: Foo<F>> {
    val a: F
    val b: Foo<F>
}
so what is assignable to a and b?
r
h
I understand their need well enough, which that SO question addresses. I updated OP to be more on point with my confusion
r
a
can only take the
F
specified by the implementation, whereas
b
can take any
Foo<f>
. For example:
Copy code
interface Bar : Foo<Bar>
class Quux : Foo<Bar> {
    override val a: Bar = ... // Must be a `Bar`
    override val b: Foo<Bar> = ...  // Can be `this` or `a` or any other `Foo<Bar>`
}
h
thanks. i think i was overcomplicating it