Could anyone help me understand why the compiler c...
# getting-started
c
Could anyone help me understand why the compiler complains here:
Copy code
import com.fasterxml.jackson.core.type.TypeReference
import java.util.function.Supplier

class Bar(val x: Int)

fun foo(whatever: Supplier<TypeReference<out Bar>>) {}

fun main() {
    val typeRef = object : TypeReference<Bar>() {}
    val supplier = Supplier<TypeReference<Bar>> { typeRef }
    foo(supplier) // expected Supplier<TypeReference<out Bar>>, got Supplier<TypeReference<Bar>>
}