1 2 3 4 5 6 7 8
trait IntConsumer { def consume(x: Int): Unit } object Test { def anyConsumer(x: Any): Unit = ??? val f: IntConsumer = anyConsumer }