Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumKotlingenerics variance in outSingle-choice MCQ

Why does the Kotlin compiler reject the second method below?

interface Producer<out T> { fun next(): T // line A fun consume(item: T) // line B }