在 Boolean 的 Scala 源代码中(此处),据说函数 && 和 || 不能使用 => 语法定义。
// Compiler won't build with these seemingly more accurate signatures
// def ||(x: => Boolean): Boolean
// def &&(x: => Boolean): Boolean
Run Code Online (Sandbox Code Playgroud)
但我看不出这些定义有任何问题!