I am a bit unclear on where and how what appears to be a type conversion takes place in the following example. Let say I define function (all shown in ammonite shell)
@ def f(x: Seq[Double]): Double = x.sum defined function f
Then following works
@ f(Seq(1, 2, 3)) res4: Double = 6.0
But this one does not
@ val s = Seq(1, 2, 3) s: Seq[Int] = List(1, 2, 3) @ f(s) cmd11.sc:1: type mismatch; found : Seq[Int] required: Seq[Double] val s = Seq(1, 2, 3); val res11_1 = f(s) ^ Compilation Failed
So the question is where is this type conversion defined, why it does not work in the second case and how can it be made to work in the second case?