Chris Cordero
07/10/2022, 11:05 PMimport 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>>
}