We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e57c86b commit 18a04c8Copy full SHA for 18a04c8
library/src-bootstrapped/scala/Tuple.scala
@@ -161,7 +161,7 @@ object Tuple {
161
def apply(): EmptyTuple = scala.runtime.Tuple0.asInstanceOf[EmptyTuple]
162
163
/** Matches an empty tuple. */
164
- def unapply(x: EmptyTuple): Boolean = x == scala.runtime.Tuple0
+ def unapply(x: EmptyTuple): true = true
165
166
/** Convert an array into a tuple of unknown arity and types */
167
def fromArray[T](xs: Array[T]): Tuple = {
tests/pos-special/fatal-warnings/tuple-exaustivity.scala
@@ -0,0 +1,4 @@
1
+def test(t: Tuple) =
2
+ t match
3
+ case Tuple() =>
4
+ case head *: tail =>
0 commit comments