scct
scct copied to clipboard
Base case of recursive list function not considered covered
I'm seeing the following in my coverage report:
11 def interpolate(sep: String)(list: List[Array[Byte]]): List[Array[Byte]] = list match {
*12* case Nil => List*()*
13 case List(x) => List(x)
14 case h :: t => h :: sep.getBytes() :: interpolate(sep)(t)
15 }
Line 12 has the parens in red (I guess because the function is never called with an empty list). Of course every call to this function involves this line, because it's the base case of the recursion.