An in position is a type-parameter usage position where a function consumes values of that type. A type parameter appears in the in position when it is used as a function parameter type. section 11.3.3
A consumer of T
interface Consumer<in T> { fun consume(value: T) } Here, value has type T, so consume consumes T values. The in keyword restricts T to in positions and supports contravariant subtyping: a generic class can be declared contravariant when its parameter is used only in in positions. section 11.3.3 section 11.4
Distinguish the two positions by asking what the function does with T:
- A parameter of type T consumes a T value and places T in the in position. section 11.3.3
- A return type of T produces a T value and places T in the out position. section 11.3.3
- Using T as a type argument of another type also requires checking the resulting position. section 11.3.3
The distinction explains why a covariant parameter marked out cannot be consumed: allowing T in an in position would make its subtype relation unsafe. Read-only List remains covariant because it returns T but does not store T values. section 11.3.3

