【发布时间】:2012-03-15 18:24:27
【问题描述】:
例如,如果我想写
1 -> 2 match {
case 1 -> 2 => "matched"
case _ => "not matched"
}
// error: not found: value ->
而不是稍微不那么明显
1 -> 2 match {
case (1, 2) => "matched"
case _ => "not matched"
}
【问题讨论】: