It is a question followed by this.
Now we have proved that Array[Int] could be implicitly converted into Int => Int, but where is the place that happens?
Obviously, Int => Int is a Function:
scala> var fun = (i: Int) => Array(1,2,3)(i)
fun: Int => Int = <function1>
And Array[Int] is a class:
scala> var arr = Array(1,2,3)
arr: Array[Int] = Array(1, 2, 3)
But arr can be assigned to fun:
scala> fun = arr
fun: Int => Int = WrappedArray(1, 2, 3)
Conversely, it will not work:
scala> arr = fun
<console>:34: error: type mismatch;
found : Int => Int
required: Array[Int]
arr = fun
^
Now, Where is the place that implicit conversion happens?