I've a piece of code for which I get a "match may not be exhaustive" warning from Scala 2.13.4, and I'd like to suppress that warning with the @unchecked
annotation. Unfortunately, all my attempts of inserting @unchecked
merely resulted in syntax errors.
Here's a mercilessly simplified version of the original code:
def foo(xs: Seq[Int], n: Int)(f: (Seq[Int], Int) => Int): Int = f(xs, n)
foo(Seq(1,2), 0) { case (Seq(a,b), c) => a + b + c }
Question: Where do I syntactically put @unchecked
at call site in order to suppress the warning?
P.S. I'd like to suppress the warning, not start a discussion of whether or not that is evil ;-)