Aladdin - Scala Bugtracking
[#1191] project: compiler priority: low category: bug
submitter assigned to status date submitted
Martin Burak fixed 2007-06-22 15:04:15.0
subject exhaustive warning despite @unchecked
code
object M6 {

  def zipFun[a,b](xs:List[a], ys:List[b]):List[Pair[a,b]] = (Pair(xs,ys): @unchecked) match {
    // !!! case Pair(List(), _), Pair(_, List()) => List()
    case Pair(x :: xs1, y :: ys1) => Pair(x, y) :: zipFun(xs1, ys1)
  }
}
what happened
ziptest.scala:5: warning: match is not exhaustive!
missing combination            Nil           Nil             *
missing combination   $colon$colon           Nil             *
missing combination            Nil  $colon$colon             *

    case Pair(x :: xs1, y :: ys1) => Pair(x, y) :: zipFun(xs1, ys1)
             ^
one warning found
what expected Silent compilation.
[back to overview]
Changes of this bug report
Burak  edited on  2007-07-06 11:30:55.0