为什么我可以使用小写字母作为名称:
val (a, bC) = (1, 2)
(1, 2) match {
case (a, bC) => ???
}
Run Code Online (Sandbox Code Playgroud)
并且不能使用大写字母:
/* compile errors: not found: value A, BC */
val (A, BC) = (1, 2)
/* compile errors: not found: value A, BC */
(1, 2) match {
case (A, BC) => ???
}
Run Code Online (Sandbox Code Playgroud)
我正在使用 scala-2.11.17