Strange type conversion from List[(Char, Char)] to Object
问题 I have a recursive function count in Scala 2.9.2 that looks like this def count(traces: Seq[(Char, Char)], acc: (TP, TN, FP, FN)): (TP, TN, FP, FN) = { val (tp, tn, fp, fn) = acc traces match { case Nil => acc case ('(', '(')::rest => count(rest, (tp + 1, tn, fp, fn)) case (')', ')')::rest => count(rest, (tp + 1, tn, fp, fn)) case ('(', ')')::rest => count(rest, (tp, tn + 1, fp, fn)) // ... exhaustive set of cases ... } } On input Seq(('(', '(')) the function throws the following MatchError :