It could sound like a rookie mistake but I do a lot of that. While passing lazy evaluated block or value into a function, if I forget somehow make that function's corresponding parameter lazy (pass/call by name) its causing some confusions at first glance because it forces evaluation.Very small ex;
lazy val a = {println("a");1}
def myfunc(b:Int){println("hello")}
myfunc(a);
Output:
a
Hello
So my question, is there any compiler help for this problem?(flag etc.) Or this is a kind of thing that I should take care of ?