Scala compilation: anonymized function
问题 Is there any specification of scala compilator that can explain that behaviour? scala version: 2_10_6 code example trait Service { def process(s: String) } object ServiceImpl extends Service{ override def process(s: String): Unit = { println(s) } } object Register { var serviceInst : Service = ServiceImpl } object Client1 { def process1(l: List[String]): Unit ={ l.foreach(x => Register.serviceInst.process(x)) } } object Client2 { def process1(l: List[String]): Unit ={ l.foreach(Register