As I understood call-by-name parameters of a method, the corresponding argument expression will not be evaluated when passing it to the method, but only when (a
call-by-name
By-name arguments are evaluated whenever they are mentioned. The spec says that right-associative operator method calls are evaluated like this:
a op_: b
desugars to:
{ val someFreshName = a; b.op_:(someFreshName) } // ↑↑↑ // Eval happens here ↑↑↑