I am trying to understand the exact details of when eta expansion happens and when param placeholders are expanded.
Going through many examples and SO answers/questions i understand the following:
val xs = (1 to 5)
/*ex1*/ xs.foreach(println)
/*ex2*/ xs.foreach(println _) // eta expansion?
/*ex3*/ xs.foreach(println(_)) // placeholder syntax
/*ex4*/ xs.foreach(println(_ * 2)) // INVALID -> xs.foreach(println(x => x * 2))
/*ex5*/ xs.foreach(Console.println _ * 2) // INVALID same reason?
/*ex6*/ xs.foreach(Console println _ * 2) // works
My quesion is: why does ex6 work?