Closed lolgab closed 1 year ago
The following code:
ujson.Bool(true) match { case ujson.Bool(v) => }
generates the following warning:
ujson.Bool(true) match { ^^^^^^^^^^^^^^^^ match may not be exhaustive. It would fail on pattern case: False, True
The problem is in the unapply signature:
unapply
def unapply(bool: Bool): Option[Boolean] = Some(bool.value)
should instead be:
def unapply(bool: Bool): Some[Boolean] = Some(bool.value)
To be able to test this we need to enable -Xfatal-warnings so I opened #457 to do that.
-Xfatal-warnings
The following code:
generates the following warning:
The problem is in the
unapply
signature:should instead be: